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