[Plugin] ConsDeleteContext
-
Name : ConsDeleteContext
Author : TIG
Usage : Deletes or Layers Guide-Lines or Guide-Points or Both:
accessed through the Context-menu/submenu:
it either deletes/layers 'All Active' or 'All in Selection/ALL' -
mining down into any selected groups/components...
If you pick a 'Selection' option BUT without anything selected then
ALL 'model entities' are processed! [Note: a context-menu will still
appear with NO selection, if the cursor is over an axis etc...]
It's one step un-doable [or two steps if Both Lines/Points option]...
https://sketchucation.com/pluginstore?pln=ConsDeleteContext -
..just to say thanks TIG!
-
My thanks as well.
-
-
Moving points to layer did not work. The plugin's code needs to be edited as follows! ..
old code
def self.layerAllGpoints()
model = Sketchup.active_model
entities = model.active_entities
model.start_operation("layer active Gpoints")
model.layers.add("CPOINTS")
entities.to_a.each{|entity|e.layer="CPOINTS" if e.valid? and e.class==Sketchup::ConstructionPoint}
model.commit_operation
endnew code
def self.layerAllGpoints()
model = Sketchup.active_model
entities = model.active_entities
model.start_operation("layer active Gpoints")
model.layers.add("CPOINTS")
entities.to_a.each{|e|e.layer="CPOINTS" if e.valid? and e.class==Sketchup::ConstructionPoint}
model.commit_operation
end -
Thanks, this code is almost 8 years old !
No one has spotted that typo before - well done...A more 'modern' fix for the wayward line might be:
entities.grep(Sketchup;;ConstructionPoint).each{|e|e.layer=model.layers.add("CPOINTS")}
Avoiding the need to first make the layer at all !
-
I was very happy if I could help. I'm waiting for you to update the plugin thanks TIG
-
I've corrected the RB file previously found in the first post - https://sketchucation.com/forums/viewtopic.php?p=100581#p100581
I've republished its RBZ in the PluginStore as v2.1
https://sketchucation.com/pluginstore?pln=ConsDeleteContext
Advertisement