Layer switch

is there any way when i select both lines a1 and a2 , use the command to convert them to b1 and b2 ? please help me

if i understood your simple yet a bit confusing request then i can suggest you the command _ChangeToCurrentLayer you can set this as an alias or as a command if you use it frequently. that of course only works per object, or if you have many objects which you want to change to one layer. if you need anything more complex like (all a1 shall go to b1 and all a2 shall go to b2) you would have to script that. alternatively you can also use the object properties panel, i believe you should have a dropdown menu which you can can switch the object. less handy.

i would love a way to quickly change the layers like in illustrator where you drag and drop the current layer indicator.

1 Like

i want all a1 to go to b1 and all a2 to go to b2, i don’t know how to write rhino script, i’m just thinking so i can manage the classes utility way

i see, well that implies scripting. maybe you could make a macro for this task. but in worst case just set up the command i suggested as a shortcut i use alt < then select all objects subsequently activate the wished layer and throw in all objects belonging to b1 whatever. if you have thousands of such object then … well get your coffee ready or maybe @Helvetosaur has some cool suggestion

1 Like

Not really, unless it was always the same specific set of layers that would be involved, it would be a specialized script that would have a relatively limited use.

If as @encephalon says, you want to move all objects on a1 to b1 then it’s just

Right click on a1 in the layers panel, choose “Select objects”, find the layer b1 in the layers panel, right click and choose “Change object layer”.

Note also that there is the little known status bar trick - select the objects you want to change, click on the layers pane in the status bar, the layers list will pop up and just click on the layer you want the objects to go to. It’s a bit faster and no right click menus to deal with.

If you are always using the same set of layers with the same names and you always want to change from one to another then yes, a one-button script could be written.

i want to select both a1 and a2 at the same time and lets become a1 to b1 and a2 to b2

i mean a1 and a2 are subclass of A they are selected at the same time and converted to b1 and b2 are subclass of B

could this script you posted here be adapted on the fly to change the layer?
opening the script and changing the names quickly in an editor would sure also help if that script would work as a basis.

ChangeObjsToHiddenLayer.py (361 Bytes)

1 Like

Thank you, I will try it

i tried and it’s not what i want, it’s just making the layer invisible

i mean a1 and a2 they are selected at the same time and converted to b1 and b2, the problem is they are selected at the same time,