Retrieve Color Of Pipe System Graphical Override Line Color

Hello

I am trying to retrieve the color of a Pipe by using the colorrange2D.GetColor Parameter node. My problem is that I don’t know the parameter name for the System Graphical Override Line Color.

Thanks

This is as far as I can take you… maybe someone with more Revit API knowledge can tell us how to get the RGB values from Autodesk.Revit.DB.Color

Autodesk.DB.Color has properties Red, Green and Blue.

X.LineColor.Red will give you the red channel value

I tried that, but I kept getting warnings, but after a good night’s sleep I realized that was because those system types didn’t have any overrides :slight_smile:
So you’ll need to filter out the Pipe System Types that have overrides and then apply the python code as Einar suggested.
I don’t have the time right now, otherwise I’d show you how.

Thanks for your help so far.

I have manually added a color override on each system. After running the code I get an error message…

Got it working now! I looked at Einar’s post and I twigged what was wrong.

It will still crash if there isn’t an override so I’m not sure how to fix that apart from manually adding a line override to all of the systems. .

1 Like

Hi,
you should use filters for this. Don’t use system graphic overrides at all, it’s just wrong way.

Tomasz - you are right. I will wait for Konrad’s Filter nodes to be released for this.

I had 1/2 of the answer and this thread help me with the half I was missing. Sweet!! :+1:

Thanks to @T_Pover!

Use this from clockwork:

RevitColor.ToDynamoColor
image

1 Like

Hey guys, is it possible to have all your script please ? i am discovering revit and i don’t understand how the python script node work…

If you are discovering the Python node the best application and point of knowledge would be the Dynamo Primer:
http://primer.dynamobim.org/en/

1 Like

i’m trying to overrides the color of my label, i would the label take the color of my pipe. I want to use this script but don’t work on my computer

Never a good idea to use code / nodes which you do not understand.

All files/scripts are in this thread.

okay thanks a lot, i will study this

thanks for your help, here is my script to change colors of the tags depending of the color of the pipes.