API: Close a file

Discussion in 'SolidWorks' started by Harry, Jul 4, 2004.

  1. Harry

    Harry Guest

    I use the method ModelDoc.SaveAs4 to rename a file.

    When I have done that, the file is somehow still "in use". How do I release
    the file?

    I have tried SldWorks.closedoc and ModelDoc.Close - but without success.
     
    Harry, Jul 4, 2004
    #1
  2. you have to supply the part title to SldWorks.closedoc

    I use this when closing a document.

    swApp.CloseDoc (Part.GetTitle)

    I presume you are not using the Copy option. you may have to reattach to the
    active document after the SaveAs.

    Corey Scheich
     
    Corey Scheich, Jul 6, 2004
    #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.