Delete nested section cuts
-
Is there an easy way to delete all section cuts in a model at once even if they are nested in groups and components (e.g. for section cut animations)?
-
Sounds like a plugin request.
-
Only if there is no native way to do this
(If there is a native way, it would be my Doh! of the day...) -
Copy/Paste this "one-liner" into the Ruby Console + <enter>.
m=Sketchup.active_model;m.start_operation("Del");m.entities.to_a.each{|e|e.erase! if e.class==Sketchup;;SectionPlane};m.definitions.each{|d|next if d.image?;d.entities.to_a.each{|e|e.erase! if e.class==Sketchup;;SectionPlane}};m.commit_operation
It deletes EVERY Section-Plane in the whole model, even those nested inside groups or components, so use with EXTREME CARE ! However, it is 'one step undoable' !
-
Thank you TIG for this one-liner which shows me that I have to learn ruby...
Advertisement