Assign new layer name quickly?
-
Hi everyone, is there a way to assign new layer name quickly, like in two basic steps or mouse clicks?
Usage example:
Step 1: right click an object, sub menu appears,
Step 2: then choose "send to new layer"- and then you type in the new layer name, press enter.
This plugin as usual, will consequently have a one click icon/button or assignable with keyboard shortcut.As comparison, presently, what I usually do is:
Step 1. open the native layers tab (I have shortcut key)
Step 2. click +
Step 3. Type the name
Step 4. Select object
Step 5. activate entity info (I have shortcut key)
Step 6. Choose the new layer name created from step 3So that's it.. 2 steps vs. 6 steps.
Thanks a lot for looking at this. Cheers!
-
Plugin not included
Also to match the naming convention please change the name to [Plugin] Assign New Layer Name
Otherwise it looks like a very useful idea
-
or type a new layer name into the entity window?
-
@pbacot said:
or type a new layer name into the entity window?
I think that you can do that on MAC, but you can't on a PC... -
OK two steps then. Buy a Mac and type the layer name into the entity window.
-
@onzki said:
Hi everyone, is there a way to assign new layer name quickly, like in two basic steps or mouse clicks?
Usage example:
Step 1: right click an object, sub menu appears,
Step 2: then choose "send to new layer"- and then you type in the new layer name, press enter.
This plugin as usual, will consequently have a one click icon/button or assignable with keyboard shortcut.As comparison, presently, what I usually do is:
Step 1. open the native layers tab (I have shortcut key)
Step 2. click +
Step 3. Type the name
Step 4. Select object
Step 5. activate entity info (I have shortcut key)
Step 6. Choose the new layer name created from step 3So that's it.. 2 steps vs. 6 steps.
Thanks a lot for looking at this. Cheers!
No icon or shortcut needed. Simply place copy of the following code in the Plugins folder, restart Sketchup. Then right click on any entity and select "Send To New Layer"
unless file_loaded?(__FILE__) mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection UI.add_context_menu_handler do |menu| unless sel.empty? menu.add_separator menu.add_item("Send To New Layer") { obj=sel.first ln=UI.inputbox(["Layer Name"],[obj.layer.name],"Send To New Layer") if ln nl=mod.layers.add ln[0] nl.name = ln[0] obj.layer=nl end } end#unless sel end#do file_loaded(__FILE__) end#file
-
I have something similar, running from the context-menu, although it allows you to specify a layer that is 'off', entering a new layer creates it OR you can choose from a drop-down list of all Layer-names.
I'll post it in the PluginStore and add a link...
EDIT:
Here's the link to its thread...
http://sketchucation.com/forums/viewtopic.php?p=563979#p563979 -
Thanks everyone for all your replies, I appreciate the help. I will check them out. Cheers!
-
@tig said:
I have something similar, running from the context-menu, although it allows you to specify a layer that is 'off', entering a new layer creates it OR you can choose from a drop-down list of all Layer-names.
I'll post it in the PluginStore and add a link...
EDIT:
Here's the link to its thread...
http://sketchucation.com/forums/viewtopic.php?p=563979#p563979Oh, I never found this on search. It's perfectly what I'm looking for, the existing layer list is also a bonus for me. Thanks for sharing!
-
-
@tig said:
I have something similar, running from the context-menu, although it allows you to specify a layer that is 'off', entering a new layer creates it OR you can choose from a drop-down list of all Layer-names.
I'll post it in the PluginStore and add a link...
EDIT:
Here's the link to its thread...
http://sketchucation.com/forums/viewtopic.php?p=563979#p563979By the way TIG, I noticed that the list of existing layers won't allow me to scroll down to see more layers- is there a new version that can scroll along the list?
-
@onzki said:
By the way TIG, I noticed that the list of existing layers won't allow me to scroll down to see more layers- is there a new version that can scroll along the list?
This is a known limitation of theUI.inputbox
drop-down list.
However, it is not insurmountable...
To pick a layer-name that is off the end of the list...
Select the drop-down box so it highlights, immediately type in the start of the layer name [DO NOT press <enter>] - e.g.X
The listing now jumps to show perhaps "Xref-1
"
If you want "Xref-3
" press the down arrow key to page to it.
If you want "Wins
" and are currently at "Xref-1
" then use up arrow key presses to get to it... -
@tig said:
@onzki said:
By the way TIG, I noticed that the list of existing layers won't allow me to scroll down to see more layers- is there a new version that can scroll along the list?
This is a known limitation of theUI.inputbox
drop-down list.
However, it is not insurmountable...
To pick a layer-name that is off the end of the list...
Select the drop-down box so it highlights, immediately type in the start of the layer name [DO NOT press <enter>] - e.g.X
The listing now jumps to show perhaps "Xref-1
"
If you want "Xref-3
" press the down arrow key to page to it.
If you want "Wins
" and are currently at "Xref-1
" then use up arrow key presses to get to it...Works like a charm! Thanks a lot!
Advertisement