API: Close a file

Jul 04, 2004 1 Replies

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.


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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required