![]() |
【转帖】not to update assembly
not to update assembly
hi, i have a macro that opens all the parts of an assembly one by one and closes each one before it opens another one and flattens the opened part but it updates in the assembly right away and causes an error with my assembly because of other parts are referenced to this part. if i manually open a part and flatten it and spit my window to see the assembly and the opened part it flattens in the assembly aswell but does not update the references and if i fold it back up and close it the assembly is fine. could somebody give an idea why this is happening ? thanks. this is the code it use to flatten: if swfeature.gettypename2 = "flatpattern" then swfeature.select2 false, -1 modeldoc.editunsuppress solidworks 2006,2007,2008,2009 (office premium.) core 2 duo e6850 @ 3.00 mhz window xp pro sp3 32 bit ati firegl v7350 the assembly has the part loading silently in the background as a reference so "opening" the part just makes it visible as it is already loaded, so the assembly will automatically update any changes. you can try checking "open referenced documents with read-only access" in the external references system options to see if that prevents the update i checked that and still does the same thing. hmmm... solidworks 2006,2007,2008,2009 (office premium.) core 2 duo e6850 @ 3.00 mhz window xp pro sp3 32 bit ati firegl v7350 answer maybe i should not have posted so soon. using this code it does not update the assembly while the part is open at least not the references. set swapp = createobject("sldworks.application") set part = swapp.activedoc set selmgr = part.selectionmanager boolstatus = part.extension.selectbyid2("flat-pattern1", "bodyfeature", 0, 0, 0, false, 0, nothing, 0) part.clearselection2 true part.setbendstate 2 boolstatus = part.editrebuild3 solidworks 2006,2007,2008,2009 (office premium.) core 2 duo e6850 @ 3.00 mhz window xp pro sp3 32 bit ati firegl v7350 quick |
所有的时间均为北京时间。 现在的时间是 08:56 AM. |