Command to select all on same layer?
-
This works great for ungrouped lines or faces. Is there a way to do this with groups and components?
-
Not without Ruby...
This one-liner will work, select ONE object on the required layer and then copy/paste this code into The Ruby Console +<enter> and the selection will expand to include everything in the "current context" that's on that same layer...m=Sketchup.active_model;s=m.selection;l=s[0].layer;s.clear;m.active_entities.each{|e|s.add e if e.layer==l}Here's a '
def' version of it - it's probably a little clearer - you can copy this code into a file in ../Plugins/ called "selectbylayer.rb"def selectbylayer() model=Sketchup.active_model ss=model.selection layer=ss[0].layer ss.clear model.active_entities.each{|e|ss.add e if e.layer==layer} end#defThen to run it you can type
selectbylayerinto the Ruby Console.
To add a Plugins Menu item add this extra code to the end of the new .rb file [after theend#def]if not file_loaded?(File.basename(__FILE__)) UI.menu("Plugins").add_item(("Select by Layer"){selectbylayer()}) end#if file_loaded(File.basename(__FILE__))To run it you pick "Select by Layer" off the Plugins Menu.
I'll leave the toolbar up to you...
-
Selection Toys will let you do that:
http://forums.sketchucation.com/viewtopic.php?f=323&t=14975 -
Thanks, all. Just when you think you've reviewed all the plugins out there...
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