Closing assemblies and parts by MACRO

I had wrote a macro for creation of STEP files from directory content

The macro read directory content save the names of drawing files then it looks for parts and assemblies with identical names, the parts and assemblies then opened and SAVEAS is used to produce a STEP file

After the STEP creation the MACRO try to close source (*.sldprt, *.sldasm).

Using

Set Part = Nothing

swApp.CloseDoc FileSNames(i)

For some reason the MACRO closes only parts but not assemblies

In  a case of many drawings in directory the MACRO stuck

Does MACRO can use another commands for closing files>

SolidworksApi macros
Answers 1
DG
DG 2013-12-12 Best Answer

Welcome to SolidWorks forums Nimrod.

I don't think there is anything different to close file.Without the complete macro it might be difficult to know the issue. Any chance if you can share the complete macro to check.

Please use "advanced editor" in case you want to attach any files.Click on reply and then click "use advanced editor".

You might also find this post helpful for your future reference.