Deepak Gupta

Macro: Batch Import Parasolid Files and Save as Part

Discussion created by Deepak Gupta on Jan 31, 2019
Latest reply on Feb 7, 2019 by Ruben Balderrama

Attached is a macro to import all parasolid files from the specified folders and sub folders and then save them as part file in same location. In case the parasolid is of assembly, then it is saved as Part as well with exterior faces option. The macro can be modified to set a different location for saving the file and saving assembly as assembly instead of part.

 

In case you want to use the macro for other formats like STEP, IGES, then changes the file extension in these two lines in the macro.

 

 

The macro has been made on SW 2019 version but should work on earlier versions as well. Changing the macro reference to your installed as suggested here Fix-Update SOLIDWORKS Macro References? (don't worry on the fact that video is for fixing missing library error but check the process to update your macro library).

 

Message was edited by: Deepak Gupta on 02/01/2019: Since there was issue with macro creating empty files with exterior options selected, this macro (V2 version) save the assembly and its referenced component first in a temporary folder and then later deletes that folder and its content.

Outcomes