AnsweredAssumed Answered

SolidWorks crashing while exporting bodies to STEP

Question asked by mech proj on Apr 1, 2015
Latest reply on Apr 1, 2015 by Keith Rice

Hi,

I am exporting bodies of a multibody part to seperate step file. After a while (exporting about 60-80 bodies) solidworks is crashing. The app flow is like:

 

objBodies = Part.GetBodies2(swBodyType_e.swSolidBody, False)

For Each body In objBodies

bRet = body.Select2(False, Data)

bRet = ChildModelDoc.SaveToFile2(FileName & SaveAsExt, swSaveAsOptions_e.swSaveAsOptions_UpdateInactiveViews, ErrorRef, WarRef)

  'tried all options of swSaveAsOptions_

swApp.CloseDoc(activepartname)

next

Just wondering if there is any other way to export bodies to STEP, or what could be the possible reason of crashing.

 

 

This code is for an idea only with lots of line skipped in between. But all the type declaration are proper, releasing objects after use.

No memory issues, shoots upto 28000K only in task manager processes, GDI objects reaches upto 1900 max. PC config: 3Ghz 6 processor, 8gb RAM, 1gb graphics card.

Outcomes