Macro help- Exporting configurations

Hello all,

I am trying to get Jeff Parker's ConfigRipper macro to work for me. I couldn't find any updated versions of it. What it does is it takes a part file with multiple configurations and exports them all to their own file named as the configuration name.

That part works fine, but the code to clean up the exported files doesn't work. I'm new to all this scripting stuff, so I'm throwing up my hands and asking you guys for help!

It hangs at the Part.DeleteDesignTable line

with Run-Time Error '91'

Object variable or With block not set

If you guys could help out, that'd be awesome. And test it out yourselves, it's pretty powerful.

SolidworksApi macros
Answers 2
SF
SF 2013-09-16 Best Answer

So I found out that if I clicked on Solidworks repeatedly while the macro ran, it worked. Anything I can do about that?

SF
SF 2013-09-17

Hi Alex,

I would suggest you use,

    Set Part = swApp.OpenDoc6(OpenName, 1, 0, "", fileerror, filewarning)   'Open saved configuration file

instead of,

    Set Part = swApp.ActiveDoc

else try adding some delay before Set Part = swApp.ActiveDoc if you want to go with that.... the file is not completely loaded in solidworks before this line of code is called and hence Part is set to nothing which is leading to the error.