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
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.
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.
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.
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.
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
What package is your View Set Element Overrides from? I don’t have one like it.
Try using this Python code instead.
from Autodesk.DesignScript.Geometry import *
from DSCore import *
from Revit.Elements import *
from System.Collections.Generic import *
from Autodesk.Revit.DB import *
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)
elements = UnwrapElement(IN)
dyncolor = IN
color = Color(dyncolor.Red,dyncolor.Green,dyncolor.Blue)
ogs = OverrideGraphicSettings()
for v,e in zip(views,elements):
#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.
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.
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,
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.
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.
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…
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?