How can I write a marco command to suppress the dialog box by choosing one object and leave that object's layer on?

Views: 224

Replies to This Discussion

Hi Tom- use, in V5 (v4 needs a script I guess)

_-OneLayerOn _Selectobject

the dash version of any command will suppress the dialog, if any.


thank you

Hi, Pascal_

_-OneLayerOn _Selectobject, the action is to run this command and select object....


_-OneLayerOn _enter, the action is to select object first and run this command...


Can we write this two in one line(no scripting) so we can either pick an object first or run the command first?

_-OneLayerOn _Enter does not turn on the layer of the preselected object and turn off all the rest here - it turns on the current layer by default.

In theory, I think _-OneLayerOn _Selectobject *could* be made to work with either pre- or post- selected objects, why it doesn't is either a bug or an oversight.

Currently, the only good way around it is a script.


Yep, that'll work...  :-)

Except I think you need a Pause for the case where there is no preselected object:

_SetLayerToObject _Pause
-_OneLayerOn _Enter

Thanks for making it simple Chris,


Attached a rhinoscript that is a bit more flexible, it shows the layer or layers of the selected objects and changes the current layer if it needs to (this was written for rh 4 but seems to work fine for rh 5 as well).


H- Thanks for bumping it up to a complete solution.



© 2018   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service