Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SaveAs Dialog Box

Status
Not open for further replies.

Lambrecht

Automotive
Apr 1, 2003
4
0
0
US
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,

Mark L.
ValeoSylvania
 
Replies continue below

Recommended for you

Thanks, but that doesn't work. What I need to do is pass the active document name to the save as dialog box. I think there is very little functionality with the FileSelectionBox object.


Thanks,
Mark

Mark L.
ValeoSylvania
 
Hi Lambrecht,

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
 
Status
Not open for further replies.
Back
Top