SaveAs Dialog Box
SaveAs Dialog Box
(OP)
Does anyone know how to specify a default path and file name for the FileSelectioBox?
Or Is there another way to call up another SaveAs dialog box?
Here is a sample of what I am trying to do: (This does not give me what I want)
For I = 2 To CATIA.Documents.Count
Dim name As String
name = CATIA.Documents.Item(I).FullName
CATIA.Documents.Item(I).SaveAs (CATIA.FileSelectionBox("Save Sub-Assemblies...", name, CatFileSelectionModeSave))
Next I
Thanks,
Or Is there another way to call up another SaveAs dialog box?
Here is a sample of what I am trying to do: (This does not give me what I want)
For I = 2 To CATIA.Documents.Count
Dim name As String
name = CATIA.Documents.Item(I).FullName
CATIA.Documents.Item(I).SaveAs (CATIA.FileSelectionBox("Save Sub-Assemblies...", name, CatFileSelectionModeSave))
Next I
Thanks,
Mark L.
ValeoSylvania





RE: SaveAs Dialog Box
RE: SaveAs Dialog Box
Thanks,
Mark
Mark L.
ValeoSylvania
RE: SaveAs Dialog Box
Recently, I had a similar problem which I solved in this way. In my case, I wanted to save some drawings from a local folder (the folder temporary) in dwg format. Please read my macro and see if its OK for you. This macro can be modified as you wish (save CATParts in igs or what ever).
Sub CATMain()
Set documents1 = CATIA.Documents
nume = "C:\temporary\*.*"
MyFile = Dir(nume)
MyFile1 = "C:\temporary\" & MyFile
While MyFile <> ""
documents1.Open (MyFile1)
Dim specsAndGeomWindow1 As SpecsAndGeomWindow
Set specsAndGeomWindow1 = CATIA.ActiveWindow
MyFile = Dir
Dim drawingDocument1 As DrawingDocument
Set drawingDocument1 = CATIA.ActiveDocument
Dim win1 As String
Dim product1 As Product
win1 = CATIA.ActiveWindow.name
win2 = Split(win1, ".")
win1 = win2(0)
win1 = "C:\temporary\" & win1 & ".dwg"
drawingDocument1.ExportData win1, "dwg"
CATIA.ActiveDocument.Close
MyFile1 = "C:\temporary\" & MyFile
Wend
End Sub
Regards
Fernando