! _SetObjectDisplayMode

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?

Hi Leex- try

SetObjectDisplayMode
Pause
Ghosted
Lock

-Pascal

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?

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)

Leex, you can put _Enter into the macro.

-Pascal

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

The first Enter is cancelling the command;

SetObjectDisplayMode
Pause
Ghosted
SelLast
Lock
Enter

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?

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((

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

Hi Mitch

-_SetObjectDisplayMode _Pause _Mode=_Ghosted _Sellast _Lock

No, it does not work

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 (

What does it do? Seems to work here…

–Mitch

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.

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

–Mitch

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

The entire catch only missing “SelectOneObject” in Rhino

I am not sure if this is what you are looking for or not. This will allow you to select multiple objects and set there display modes at the same time in all viewports.

HTH,
Don

SetObjectDisplayModeAll.zip (4.6 KB)

interesting script
I think that it is possible to do a quick aid of visualization with different light sources and materials.
A kind of rendering soft)

By the way where can I find such a script to do the math based on the weight of the material density of the material and data on the volume of 3d models?
Helped to quickly find weight in metals, glass, plastic, wood …

Have a look here:

http://wiki.mcneel.com/people/peterharris

Peter’s BOM tool calculates weight.

HTH,
Don

Thanks