C# highlight object

Hello,
I am looking for an elegant solution to temporarily highlight a rhino object (for example a Brep) when identified by a process running in a WPF application. The WPF uses a mouse over event to return a Guid to command that matches the object to be highlighted.

Is there an elegant way to do this without coloring the object or its wires in the display pipeline?

Many thanks in advance.

RhinoDocument.Objects.FindId(id).Highlight(true);
2 Likes

Once you have the actual RhinoObject for the Guid, you can toggle highlighting with the .Highlight(bool) method

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObjects_RhinoObject_Highlight.htm

2 Likes

Great minds think alike, right :rofl:

1 Like

@Mahdiyar
@menno

Thank you both - this is/was helpful!

Here is a question. If an object is already selected (and highlighted) is there an elegant way to highlight the highlight?

I’m sorry for asking such an obscure or confusing question. I have a need to visually distinguish an object in a collection objects that are already selected.

I would prefer not to use the display pipeline…

I don’t think so, highlight and selection both use the same color. Of course with a display pipeline you can do this, draw the object(s) in another color.

@menno,

Yes I just gave into display pipeline - thanks!