API Question - ModelDoc2::SaveAs4 , how to prompt for path ?

Discussion in 'SolidWorks' started by SW Monkey, Jan 3, 2007.

  1. SW Monkey

    SW Monkey Guest

    I want to use the ModelDoc2::SaveAs4 command with my Save to DXF macro,
    but I am trying to figure out how to get the SaveAs dialog box to
    popup for the user to choose where to save the file. After reading the
    help file and examples, it looks like the default is the same directory
    as the SLDDRW.

    Any help appreciated. Thanks.
     
    SW Monkey, Jan 3, 2007
    #1
  2. SW Monkey

    fcsuper Guest

    You could use InputBox to get started (to test the code). The drawback
    is that it would require the user to know the exact path and type it in
    correctly. I used this method in one of my SaveAs4 macros to save as
    PDF.
    (http://sw.fcsuper.com/index.php?name=UpDownload&req=viewdownloaddetails&lid=3
    in case you wish to check it out).

    A form may be required, using the ListBox to show the folders available
    for save. I don't know if SolidWorks API is allowed to call Windows
    Save window (I seem to remember looking into this before), but you can
    definately create your own standard list (either built into the macro
    or in an external .ini file), or find a way to traverse the harddrive
    and list the results, so the user doesn't have to remember and type in
    the locaiton.

    I'm only just OK at API, so I might be wrong about some of this.

    Matt
     
    fcsuper, Jan 4, 2007
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.