API: Close a file

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.

Reply to
Harry
Loading thread data ...

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

Reply to
Corey Scheich

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.