.NET Framework Class Library
DataEntrHelper.GetDefaultFileName Method
|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > .NET API > MwPDMApi Namespace > DataEntrHelper Class > DataEntrHelper Methods > .NET Framework Class Library |
Generates the default file name (including extension but excluding the directory path) based on the provided number and current context.
The method considers various configuration flags and context:
•Standard context: If category management is enabled (CM_USE_SUBCODES) and configured to prepend the first category, the category name is prefixed to the file name using CM_Separator. Otherwise, only the number and extension are used.
•ADW (Assembly Duplication Wizard): Attempts to replace the original component ID in the file name with the new number. Falls back to appending the new number and extension if no match is found.
•Configuration management: If active configurations are used, the method may override the file name with an existing one or retain the current configuration-specific name depending on whether the context is ADD_CONFIGURATION or SAVE_AS.
Namespace: MwPDMApi
Assembly: MwPDMApi (in MwPDMApi.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Visual Basic |
|---|
Public Function GetDefaultFileName ( _ NewNumber As String _ |
C# |
|---|
public string GetDefaultFileName( string NewNumber |
Visual C++ |
|---|
public: String^ GetDefaultFileName( |
JavaScript |
|---|
function getDefaultFileName(NewNumber); |
Parameters
NewNumber
Type: System.String
The new identifier used as the basis for the generated file name.
Return Value
The constructed file name (with extension), or an empty string if generation fails.
See Also