In CATScript
Sub CATMain ()
Dim objDialog
' Create a dialog object
Set objDialog = CreateObject( "UserAccounts.CommonDialog" )
myDir = "c:\temp\Diverse\"
' Check arguments and use defaults when necessary
If myDir = "" Then
' Default initial folder is "My Documents"
objDialog.InitialDir = CreateObject( "WScript.Shell" ).SpecialFolders( "MyDocuments" )
Else
' Use the specified initial folder
objDialog.InitialDir = myDir
End If
If myFilter = "" Then
' file filter can be "All files" or something else
'~ objDialog.Filter = "All files|*.*"
objDialog.Filter = "CATParts|*.CATPart"
Else
' Use the specified file filter
objDialog.Filter = myFilter
End If
' Open the dialog and return the selected file name
If objDialog.ShowOpen Then
GetFileName = objDialog.FileName
Else
GetFileName = ""
End If
Dim ADoc As Document
Set ADoc = CATIA.Documents.Open (GetFileName)
End Sub
------------------
Best regards
Fernando
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP