How can I write a marco command to suppress the dialog box by choosing one object and leave that object's layer on?
Tags:
Permalink Reply by Pascal Golay on January 28, 2013 at 8:19pm 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.
-Pascal
pascal@mcneel.com
Permalink Reply by Tom on February 10, 2013 at 9:50pm 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?
Permalink Reply by Helvetosaur on February 11, 2013 at 12:59am _-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.
----H
Permalink Reply by Chris Tietjen on February 11, 2013 at 5:15am
Permalink Reply by Helvetosaur on February 11, 2013 at 5:47am 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,
----H
Permalink Reply by Simon Kallioinen on February 11, 2013 at 5:56am Hi,
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).
Permalink Reply by Chris Tietjen on February 11, 2013 at 6:35am H- Thanks for bumping it up to a complete solution.
© 2013 Created by McNeel Admin.
