Setobjectdisplaymode glitch

Hi folks,

Using setobjectdisplaymode command a lot to assign specific colors to different parts of my model. Have found though that occasionally it loses its “assignments” and goes back to neutral. I have tried to trace the cause but haven’t been able to. At one point, it seemed to happen when I hit _4views a couple of times, but when I tested it again, it didn’t happen.

Any thoughts?

It would be nice if we could lock these display “assignments” so that we don’t have to redo them.

Thank you

Following up on above, I just noticed that you can have displaymodes assigned to different parts of the model in the Perspective viewport, but if you open a new layout, the window in it will display the model in neutral mode. Shouldn’t it display the colors that you assigned?

SetDisplayMode is not only per object, it is also per viewport. So the objects will only have that custom display mode in the viewport that was active when you set it. Don’t know if that’s what you’re seeing…


Hi Mitch,

I know that… but for some reason, the viewport that I have assigned the custom display modes in, revert back to neutral … with no way to undo… or restore, unless I go in and object by object, surface by surface, reassign the custom display modes.

Is anyone else encountering this?

Hi Cosmas- object display mode does not change anything about the object color or anything like that it only derermines what display mode is going to be used to show it on screen in a particular viewport. I know you may know that already but it seems like, possibly, you are mixing material assignment with display mode in your mind.


Hi Pascal, I’m glad you weighed in. I know that setobjectdisplaymode doesn’t actually assign materials to an object. I use it to differentiate between objects on construction documents, so the abstract “cartoonish” quality of the colors as seen in Shaded mode works well. The p r o b l e m is… that I sometimes spend 10 minutes assigning these displays to a model, only to have them stripped … unexpectedly. I’ve got to believe it’s a bug, but I have not been able to identify the pattern that precedes it. I was wondering if anyone else has had the same problem.

Thank you.

My only thought at the moment is that there is a change in viewports somehow. Shout if you can reproduce the thing and I’ll take a look as well.


G’day @pascal,

There was a small glitch with _SetObjectDisplayMode this morning.

Perspective viewport set to Pen, one of two groups set to wireframe, all working as expected.

Closed, opened and the wireframe group of objects are invisible (not hidden as window selecting them still worked). Setting that group to Useview then back to wireframe fixed it. Can’t send the model this time, sorry.