Override Projection Line Color in all Views

Greetings,

I am attempting to create a script which colors our mechanical engineer’s pipes (in their file) specific colors in all views. I’ve successfully made this work for active view, but rather than having them open Dynamo Player and running the script every time they change views, it would be great if this script worked for all views.

The way our engineers model pipes is to use the same pipe family and then use the pipe’s instance parameter “System Type” to distinguish them (hot water, cold water, vent, gas, etc.). My script currently identifies each pipe and sorts them by their “System Type” instance parameter and then colors them based on a selected color inside the script. There are currently 10 different System Types so I’ve managed to create unique colors for each type within the script.

Again, the biggest hurdle is getting this to work on all views all at once. Any tips?

Plumbing Color Overrides.dyn (96.1 KB)

Just wondering, is there a reason not to modify the Graphic Overrides of the System Type itself in its type properties?

Otherwise I would suggest creating filters by system type and adding them to your view templates :slight_smile:

1 Like

Great question @awilliams. I’m an architect working to create this script for the engineers in my office. From what I can gather, the engineers do modify these colors in the System Type type properties. However, when they start a project they have to do this every time (could probably be alleviated by modifying project template) and when they go to print they need everything changed to black. I guess it’s somewhat time consuming to go back and forth when they are somewhat frequently printing check sets and such.

A slight modification of the code from @Dimitar_Venkov here to handle lists of Line names and Style Colors should do the trick.

Then you can just insert a toggle Boolean prompt “Change to Black, Change to Colors” for your Engineers using Datashapes of the standard Dynamo Player UI (if using Revit 2018) :wink: