! _SetObjectDisplayMode


#1

! _SetObjectDisplayMode

Works in one viewport only.
How to do for all viewports??
Thanks


(Pascal Golay) #2

Hi Leex- a macro can help-

! _SetObjectDisplayMode Rendered
_NextViewportToTop
_SetObjectDisplayMode Rendered
_NextViewportToTop
_SetObjectDisplayMode Rendered
_NextViewportToTop
_SetObjectDisplayMode Rendered
_NextViewportToTop

-Pascal


#3

Thank You!!!

Pascal, how combine macros into a single script or create a new comand?


(Pascal Golay) #4

Hi Leex- you can assign a macro to a new alias- does that do what you need (Options > Alias page)
-Pascal


#5

Hi Pascal
I wrote this macro. To locked the object looked translucent

_SetObjectDisplayMode
_Ghosted
_Lock

If the object was selected before running the macro then the command is executed without question. But if I first run the macro, then in the command line have to choose the sub-commands.

QUESTION
Can I combine my macro in one piece?
So it become not necessary to answer the questions on the command line?


(Pascal Golay) #6

Hi Leex- try

SetObjectDisplayMode
Pause
Ghosted
Lock

-Pascal


#7

it works as well as my macro.

Here is what I got
it works :smile:

_SetObjectDisplayMode
_Pause
_Ghosted
_SelLast
_Pause
_Lock

is there another way to combine into one macro so that it runs with one click?


#8

In the process of implementation of the basic commands I must always press Enter to confirm.
But there are some commands that do not require confirmation.
example: CPlane, Point, Scale, Offset, Mirror, Show and many others.

Can I remove the confirmation for some commands? Within such commands as Lock, Boundingbox, Hide…

I would like to get an instant command execution.
Algorithm is as follows:

start command>>
select object (without press Enter when done)>>
execution (without press Enter when done)


(Pascal Golay) #9

Leex, you can put _Enter into the macro.

-Pascal


#10

Let’s try an example command SetObjectDisplayMode.

!!Important!! At the moment object is not selected !!!

start Command >>
select object >>
Once I select the object, here the command requests confirmation! (press enter when done) that I want to exclude

But if I put in a macro pause and enter then command is no longer satisfied

SetObjectDisplayMode
Pause
Enter
Pause
Ghosted
Enter

It does not work


#11

The first Enter is cancelling the command;

SetObjectDisplayMode
Pause
Ghosted
SelLast
Lock
Enter


#12

Thank you Brian! But it does not change the essence of the problem. I want to get rid of the phrase press enter when done.
Generally it is possible?


#13

It works almost as it should
But the phrase press enter when done on the command line still appears

Select
Pause
Enter
SetObjectDisplayMode
Ghosted
lock
Enter

Apparently where there is not enough Enter for automatic confirmation.
Went through all the possible options. does not work((


#14

That’s because you can select multiple objects with the command. Even if you use “Select” before the command, you will still have to confirm when you are done selecting objects - UNLESS you preselect them all before running the macro.

There is no “SelectOneObject” command in Rhino, it can be done, but you would need to have a script at that point, not a macro

For me, the following macro is about as good as it gets:

-_SetObjectDisplayMode _Pause _Mode=_Ghosted _Sellast _Lock

That doesn’t work for you?

–Mitch


#15

Hi Mitch

-_SetObjectDisplayMode _Pause _Mode=_Ghosted _Sellast _Lock

No, it does not work


SetObjectDisplayMode - all viewports
#16

There is no “SelectOneObject” command in Rhino, it can be done, but you would need to have a script at that point, not a macro

Does anyone have such a script?
Unfortunately I can not write scripts (


#17

What does it do? Seems to work here…

–Mitch


#18

Hi leex, the downside of your macro or a script is that you will end with a ghosted object once you Unlock the object. You might get similar results by globally setting a transparency for locked objects in one or all your desired displaymodes. There is no macro or script required and it returns to regular display once you unlock it.

c.


#19

I was going to mention that as well, but I assumed he had another reason for doing this…

–Mitch


#20

Quite right, Mitch.
I took a SetObjectDisplayMode for example only.

The entire catch only missing “SelectOneObject” in Rhino