Solid Edge Framework Type Library
GetSaveAsFileName Method
Member of the LinksUpdateOption constant set that is applicable when a linked document (which has been in-place activated and modified) is saved to a new name.
Specifies the index number in the FileFormat property of the Application object that indicates the filter to be used when saving the document.
Specifies the suggested file name. If this argument is omitted, the active document name is used.
Specifies the file filtering criteria. The filter string consists of pairs of file filter strings followed by the MS-DOS wildcard file filter specification, with each part and each pair separated by commas. For example, the following string specifies a text file filter: "Text Files (*.txt),*.txt" . To use multiple MS-DOS wildcard expressions for a single file filter type, separate the wildcard expressions with semicolons. For example: "Solid Edge Files (*.asm; *.prt),*.asm;*.prt". If omitted, this argument defaults to "All Files (*.*),*.*". If you wish to use standard Solid Edge filters, "default" will get the filter based on the active document. If no active doc, the filter for part is returned. If a filter for a particular file type is desired, whether that type of file is active or not, pass in "default_XXX" where "XXX" is one of the file extensions like "par" or "asm".
Specifies the index number of the default file filtering criteria from one to the number of filters specified in FileFilter. If this argument is omitted, or if is greater than the number of filters present, the first file filter is used.
If this argument is omitted, the dialog title is "Save As."
Specifies if the document being saved is a template.
Description
Returns the new name of the file to save.
Syntax
Visual Basic
Public Function GetSaveAsFileName( _
   ByRef LinkSaveOption As Integer, _
   ByRef SelectedFilter As Long, _
   Optional ByVal InitialFilename As Variant, _
   Optional ByVal FileFilter As Variant, _
   Optional ByVal FilterIndex As Variant, _
   Optional ByVal Title As Variant, _
   Optional ByVal IsTemplate As Variant _
) As Variant
Parameters
LinkSaveOption
Member of the LinksUpdateOption constant set that is applicable when a linked document (which has been in-place activated and modified) is saved to a new name.
SelectedFilter
Specifies the index number in the FileFormat property of the Application object that indicates the filter to be used when saving the document.
InitialFilename
Specifies the suggested file name. If this argument is omitted, the active document name is used.
FileFilter
Specifies the file filtering criteria. The filter string consists of pairs of file filter strings followed by the MS-DOS wildcard file filter specification, with each part and each pair separated by commas. For example, the following string specifies a text file filter: "Text Files (*.txt),*.txt" . To use multiple MS-DOS wildcard expressions for a single file filter type, separate the wildcard expressions with semicolons. For example: "Solid Edge Files (*.asm; *.prt),*.asm;*.prt". If omitted, this argument defaults to "All Files (*.*),*.*". If you wish to use standard Solid Edge filters, "default" will get the filter based on the active document. If no active doc, the filter for part is returned. If a filter for a particular file type is desired, whether that type of file is active or not, pass in "default_XXX" where "XXX" is one of the file extensions like "par" or "asm".
FilterIndex
Specifies the index number of the default file filtering criteria from one to the number of filters specified in FileFilter. If this argument is omitted, or if is greater than the number of filters present, the first file filter is used.
Title
If this argument is omitted, the dialog title is "Save As."
IsTemplate
Specifies if the document being saved is a template.
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim linksUpdateOption As SolidEdgeFramework.LinksUpdateOption
        Dim selectedfilter As Integer
        Dim strInitialFileName As String = String.Empty
        Dim strFileFilter As String = String.Empty
        Dim filterIndex As Integer
        Dim strSaveAsFileName As String

        Try
            OleMessageFilter.Register()

            objApplication = Activator.CreateInstance(Type.GetTypeFromProgID("SolidEdge.Application"))
            objApplication.Visible = True

            linksUpdateOption = SolidEdgeFramework.LinksUpdateOption.igNoLinksUpdate

            'If the input filter is provided and the filter is “default”, it get's the active document and base the filter on the document type.
            'If there is no active document it defaults to the filter list for a part file.
            strFileFilter = "default"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            'To get the default filter for a non-active document, the filter passed in can be one of the folllowing:
            strFileFilter = "default_asm"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            strFileFilter = "default_dft"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            strFileFilter = "default_familyasm"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            strFileFilter = "default_par"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            strFileFilter = "default_psm"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)

            strFileFilter = "default_pwd"
            strSaveAsFileName = objApplication.GetSaveAsFileName(linksUpdateOption, selectedfilter, strInitialFileName, strFileFilter, filterIndex)
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

Application Object  | Application Members