×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

SaveAs Dialog Box

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,

Mark L.
ValeoSylvania

RE: SaveAs Dialog Box

Try Tools > Options > ... Document tab Folder = Current .. then configure "Other Folder" search order.

RE: SaveAs Dialog Box

(OP)
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

RE: SaveAs Dialog Box

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close