Revit Grasshopper highlight element with Color

Hi,

I changed the type of a window element in Revit via Grasshopper with the component “Element Type Property”. Now in addition to changing the type, I´d like to also highlight the elements in color in the Revit viewport. Is that possible? For example by using the “Custom Preview” - Component? Anyone any ideas? Thank you so much!

Kind regards,
Clemens

Could you clarify what do you mean by custom preview component?
Do you mean you want to physically change the color of the element in Revit? If so
What would be the manual steps using Revit ui to do that ?
Because there’s many ways to color in An element and Revit using the ui

just want to know which way you want to do it then I would have a better understanding on how to help you solve your issue thanks

View Filters in Revit provide overrides by various properties, if you aren’t using the object style material to control color.

Yeah great point and the question is which one do you want to use in Revit?
Or do you even ?..
care as long as it turns a certain color?

Hey @marcellojs ,

I´d like not to physically change the color in Revit. Maybe it´s more clear like that: For example, if I have a surface made in GH and click on the component it highlights the preview in Rhino. And now I want the same in Revit: I´d like to click on a component in GH and then the window for example gets highlighted in Revit. The best would be if I could change the color of the preview like here: Custom Preview - Grasshopper

Thank you so much @marcellojs and @Rickson

Clemens

Ahhhhhh
We Will have to let Mcneel take that one
I don’t believe that is a feature at the moment that sounds more like a feature request
@kike @scottd ?
Thx

1 Like

Thank you! Or even replacing the window with a surface but anyhow I want to preview sth in the revit viewport

you could make your own custom GH component that will change the color of the Revit Window via the Element override method from the REVIT API like so… doc.ActiveView.SetElementOverrides(elemId, overrideGraphicSettings); but you would need to “feed” in the elementid

and you want to take it a step further where when you “click” on the component/node then the elementID that is stored in that component/node will extract the element id and pass it to the setelementoverride custom node. … again that one would be for McNeel because that is a bit more complicated or you or anyone would know how to do that could write a custom component… is that what you wanted to do?

1 Like

Hey @msgambelluri ,

the first approach sounds very much like what I´m looking for! Could you explain it a bit more detailed how I can manage to create my own component? Is it possible with python? C# unfortunatelyy I´m not good at it. I do have the elementid of the Revit windows.

Kind regards,
Clemens

Sure I’ll work up a sample for you
In python in C-sharp

Thx
Marcello

1 Like

Thank you so much @msgambelluri

Hi @clemenslindner

Since colored meshes are working in Revit Shaded modes, you can use it as a workaround to highlight geometry in your model.
It would be nice to have a Custom Preview in Revit, the problem is as you can see in the video when the previewed geometry perfectly overlays with geometry that is already on the model.

3 Likes

Hi @kike amazing! Thank you so much! It´s exactly what I´m looking for!

Kind regards,
Clemens

ok looks like you got it solved here
thx @kike
also a point of clarification
@kike
I thought that the only thing that is “previewed in Revit” is GH geometry?
if so that means that a selected element from Revit via GH is auto “converted” to GH geometry and thus previewed in Revit? or am I simplifying it too much? thanks

Hi @msgambelluri,

It’s exactly what you described.

Hi @kike,

I’ve tried to replicate what you did but get an error message. any idea why?

Many thanks,

Stephan

@stephan.s is the color swatch component disabled? It looks grayed out