# Change revision cloud color based on "Issued to" parameter

**URL:** <https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799>\
**Category:** Revit\
**Created:** [September 13, 2017, 5:58pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799 "2017-09-13T17:58:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 13, 2017, 5:58pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/1 "2017-09-13T17:58:37Z")

</div>

Hi. I have been searching for a solution to this problem for some time, but without any effects.  
What I am trying to do is to create color overrides for revision clouds (and preferably tags) based on the “Issued to” parameter. This way I want to create different colors for revisions refering to construction, HVAC, etc.  
I was trying to do something like in the attached image but: 1. it worked only once (?) and 2. it should work only in one view, whereas I would like it to work in all views. It doesn’t throw any erros, it just doesn’t do anything 🙂

 ![revision](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/b/4bbdd212aad46bbfe7e7e3a666252f0a214211aa.png)  
Well, I hope someone can help mi with this. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 13, 2017, 6:21pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/2 "2017-09-13T18:21:22Z")

</div>

Once you get all KON clouds, you need to get the view they exist in as well. I think there’s a node like OwnerView or something? Can’t check right now, but that would give you the cloud and the view you want to set the overrides for.

You should be able to do the same thing for the tags.

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 13, 2017, 9:09pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/3 "2017-09-13T21:09:49Z")

</div>

I’ll try it. What could be the reason for it not working? Usually my failed attempts gave some notification but this time there are no errors yet nothing happens.  
Also I tried to specify the View by choosing “Level 1” from the list of available views.

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [September 13, 2017, 9:34pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/4 "2017-09-13T21:34:19Z")

</div>

Hi,  
Here is a little something I cooked up to re-color all the revision clouds of a specific issue on all the sheets within a project. You may be able to adapt this to suit your own needs.

It has been written to run in the Dynamo Player with no-dependencies.

[(DP1.3) Override Cloud Color by Revision.dyn](https://forum.dynamobim.com/uploads/short-url/A2HxSKpL9Q9BnjMsZgsYNZb8KsJ.dyn) (39.0 KB)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 14, 2017, 4:55pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/5 "2017-09-14T16:55:50Z")

</div>

I assume it’s “not working” because you got all your clouds in the entire project and set the overrides for only one view. Since overrides are view specific the element only changes if it exists in the specified view.

If you want to set the overrides for every cloud in every view you have to tell it which view the cloud lives in. Element.OwnerView will do that. Then you can input a list of views with a list elements to override.

It all works. You just have to get the correct list structure and the correct information.

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 14, 2017, 5:33pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/6 "2017-09-14T17:33:09Z")

</div>

It didn’t work even in the active view. Anyway I will try using the tools both of you mentioned and see if I can get it to do what I need. I’ll get back here when I get some results. Thanks!

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 16, 2017, 8:57pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/7 "2017-09-16T20:57:09Z")

</div>

Ok, I think it is over my head. Tried using Element.OwnerView - it gives me a list of views where the revision cloud are which is awesome. I plugged it in, but still no results. The revision clouds stay untouched.

 ![revisions](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/afe14f609d0131d856e5b32bbd69039f7c4e173e.png)  
I even tried using OverrideColorInView just for the active view, as it seemed to be the simplest thing to do, but still no effect.  
The definition provided by Ewan\_Opie is too complicated for me at this stage, but I’ll try to understand it 🙂

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 18, 2017, 2:19pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/8 "2017-09-18T14:19:09Z")

</div>

Ah, you’re filtering the parameter value not the element. You want the All Elements of Category output going into the List.FilterByBoolMask input.

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 18, 2017, 8:06pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/9 "2017-09-18T20:06:51Z")

</div>

I tried this:  
 ![2017-09-18_revisions](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b3ec6606a05a8c154e0401c4cbdd0a506ba2cd1a.png)

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 18, 2017, 8:07pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/10 "2017-09-18T20:07:23Z")

</div>

and this:  
 ![2017-09-18_revisions_2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/4/8499ecb28c0a3edac2a6c69d8dbc0288324fc000.png)

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 18, 2017, 8:08pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/11 "2017-09-18T20:08:23Z")

</div>

but nothing happened to the revision clouds.

Only when I tried this, the cloud changed color:  
 ![2017-09-18_revisions_3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/5/150e4f84fe5c60703127cd9222a64ce044941808.png)  
As you mentioned it modifies them only in the active view which is not what I am ultimately trying to achieve.

I really hope my questions aren’t as dumb as I think they are 🙂

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 18, 2017, 8:15pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/12 "2017-09-18T20:15:06Z")

</div>

What package is your View Set Element Overrides from? I don’t have one like it.  
Try using this Python code instead.

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('DSCoreNodes')
from DSCore import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
views = UnwrapElement(IN[0])
elements = UnwrapElement(IN[1])
dyncolor = IN[2]

color = Color(dyncolor.Red,dyncolor.Green,dyncolor.Blue)
ogs = OverrideGraphicSettings()

TransactionManager.Instance.EnsureInTransaction(doc)
for v,e in zip(views,elements):
	v.SetElementOverrides(e.Id,ogs.SetProjectionLineColor(color))

TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable.
OUT = 0

```

It will set the projection overrides for an element in a given view. You’ll need the list of views each element resides in, the list of clouds to be overridden, and a single ARGB color.

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 18, 2017, 8:37pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/13 "2017-09-18T20:37:06Z")

</div>

It’s Hot Gear. I tried the script you provided and it works like a charm. Thanks!

 ![2017-09-18_revisions_4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/5/5500fada19c8335593a08aa51be88060c073ca78.png)  
I couldn’t get it to work with Element.OwnerView tho, so I’am currently restricted to only one type of view, which is sufficient at this time.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 18, 2017, 8:42pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/14 "2017-09-18T20:42:14Z")

</div>

My test script was run with OwnerView so I’m not sure what the issue is.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b318a687ef795c8ecd6ddedaaf851388fd0693d8.png)

---

<div class="post-metadata">

**Author:** ![krzh](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@krzh](https://forum.dynamobim.com/u/krzh)\
**Post date:** [September 18, 2017, 8:53pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/15 "2017-09-18T20:53:35Z")

</div>

sorry, my bad. I plugged the All Elements of Category directly to the Element.OwnerView and as I can see, I should have done it with the filtered by boolean version. Now it’s really working like a charm.

---

<div class="post-metadata">

**Author:** ![brad.witt](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@brad.witt](https://forum.dynamobim.com/u/brad.witt)\
**Post date:** [September 10, 2018, 1:39pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/16 "2018-09-10T13:39:09Z")

</div>

Ewan,  
I am somewhat new to Python, and I am looking to add to your script. Do you by chance know where I can add to change the linetype of the revision? Also would you be so kind as to tell me what that line(s) of code would be? I am looking at making my revision clouds “dashed” along with turning them red.  
Thank you in advance,  
Brad

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [September 11, 2018, 11:11pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/17 "2018-09-11T23:11:40Z")

</div>

Updating the python code to add this to the GraphicsOverrideSettings created is the way to go.  
An additional node/workflow to specifiy the Line Pattern will be required, I have just used the node from the #archi-lab package.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/7/97e31469f35d28bee0935fd08f2d405e4fca4aeb.png)

Revised code below.

```
import clr
clr.AddReference("ProtoGeometry")
from Autodesk.DesignScript.Geometry import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

from System.Collections.Generic import *

clr.AddReference("RevitAPI")
import Autodesk

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

listlength = IN[3]
patID=UnwrapElement(IN[4]).Id

elements = []
for i in IN[0]:
	elements.append(UnwrapElement(i))

viewlist = []
for j in IN[2]:
	viewlist.append(UnwrapElement(j))

dsColor = IN[1]
colRed = dsColor.Red
colGreen = dsColor.Green
colBlue = dsColor.Blue
color = Autodesk.Revit.DB.Color(colRed, colGreen, colBlue)

gSettings = Autodesk.Revit.DB.OverrideGraphicSettings()
gSettings.SetProjectionLinePatternId(patID)
gSettings.SetProjectionLineColor(color)

TransactionManager.Instance.EnsureInTransaction(doc)

result = []
for k in listlength:
	try:
		id = elements[k].Id
		viewlist[k].SetElementOverrides(id, gSettings)
		result.append("success")
	except:
		result.append("failure")
	
TransactionManager.Instance.TransactionTaskDone()

OUT = elements, result
```

---

<div class="post-metadata">

**Author:** ![brad.witt](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@brad.witt](https://forum.dynamobim.com/u/brad.witt)\
**Post date:** [September 12, 2018, 12:15pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/18 "2018-09-12T12:15:21Z")

</div>

> [@Ewan\_Opie](#):
>
> import clr clr.AddReference(“ProtoGeometry”) from Autodesk.DesignScript.Geometry import \* clr.AddReference(“RevitNodes”) import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference(“RevitServices”) import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager from System.Collections.Generic import \* clr.AddReference(“RevitAPI”) import Autodesk doc = DocumentManager.Instance.CurrentDBDocument uiapp = DocumentManager.Instance.CurrentUIApplication app = uiapp.Application listlength = IN[3] patID=UnwrapElement(IN[4]).Id elements = for i in IN[0]: elements.append(UnwrapElement(i)) viewlist = for j in IN[2]: viewlist.append(UnwrapElement(j)) dsColor = IN[1] colRed = dsColor.Red colGreen = dsColor.Green colBlue = dsColor.Blue color = Autodesk.Revit.DB.Color(colRed, colGreen, colBlue) gSettings = Autodesk.Revit.DB.OverrideGraphicSettings() gSettings.SetProjectionLinePatternId(patID) gSettings.SetProjectionLineColor(color) TransactionManager.Instance.EnsureInTransaction(doc) result = for k in listlength: try: id = elements[k].Id viewlist[k].SetElementOverrides(id, gSettings) result.append(“success”) except: result.append(“failure”) TransactionManager.Instance.TransactionTaskDone() OUT = elements, result

Perfect! That is exactly what I needed it to do. I just used the built in revit Line Patterns node. It works just the same. A lot of my users are not in my local office and they are not that familiar with Dynamo so I try to limit the number of external packages they would need to install.  
Thanks again!  
Brad

---

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [November 27, 2018, 4:36pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/19 "2018-11-27T16:36:30Z")

</div>

Hello Guys,

this script worked perfectly until today - thanks for that! Now we are experiencing some trouble - i hope someone here can help! I see the second color (blue) as wished only in the matrix view - all clouds in the dependent views (that are obviously the very same clouds) will be shown red…

Thanks!

---

<div class="post-metadata">

**Author:** ![cftrevizo](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@cftrevizo](https://forum.dynamobim.com/u/cftrevizo)\
**Post date:** [January 24, 2019, 4:24pm UTC](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799/20 "2019-01-24T16:24:38Z")

</div>

I’m having issues grabbing the “Dependent Views”, so I’m having to open each of those views up & run the Element.OverrideColorInView node from the Code Block Position as the final node. It sucks as there’s a deadline to get them out, but for future references I’d like to get it resolved.

Any Idea how to grab those dependent views too, or to just isolate that selection type?

[Next page](https://forum.dynamobim.com/t/change-revision-cloud-color-based-on-issued-to-parameter/14799.md?page=2)
