Selective component explode
-
Make a small SKP with a few components in it - one named 'KLC2-'.
Then run my one-liner [with any typos corrected - original is now fixed!].
It should not go into a loop...
Report Console errors, if any... -
this is what i typed in the ruby console
n='KLC1-';m=Sketchup.active_model;m.start_operation('x',true);m.definitions[n].instances.each{|i|i.explode};m.commit_operation;it does make a loop...
this a shot of the ruby console, but it never ended, i had to force sketchup out

-
What does
m.definitions[n]return assuming you define 'n' and 'm' as partial code beforehand... -
The model you provided, is that the whole model that you are working with or just a portion? The first code I posted completed in 2 seconds on that model, so I'm hoping that is only a small portion of a much larger model?
-
Works fine for me too, and explodes all 122 instances in a few seconds, using my code !

-
Geo - make certain the Outliner window is closed, and try again. Then disable that SketchStruct plugin and try again.
-
@chris fullmer said:
The model you provided, is that the whole model that you are working with or just a portion? The first code I posted completed in 2 seconds on that model, so I'm hoping that is only a small portion of a much larger model?
no, it is the whole model
the problem must be with my computer
i shall try to find out
-
Ahh, that's good to know! Definitely try disabling other plugins like Jim mentions.
-
@jim said:
Geo - make certain the Outliner window is closed, and try again. Then disable that SketchStruct plugin and try again.
you solved my problem !
I deleted sketchtruct and both TIG and Chris did the job in a few seconds...
How did you guess it was coming from sketchtruct?
This shows how much your "plugins quarantine" idea may help to solve plugin problems...
Thank you
-
Great job Jim!
-

-
@glro said:
How did you guess it was coming from sketchtruct?
Lucky guess, but the Ruby Console gave a bug hint...

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement