Rhythm has been updated to include some cleanup of the following nodes. I
have renamed them to better reflect the Dynamo naming standards. This means if
you previously used these nodes they are found under a different name now.
I have also bundled in a few more nodes that I will discuss in greater detail
later. But for now I need to get my RTCNA abstracts submitted!
-John

Hi
ReplyDeleteIs it possible to update the Element.OverrideProjectionLineColor Node to not resetting the other view specific graphice for example the surface patterns.
Thanks in advance.
Best Ragards
Jepser @Jwallaert
Thanks for the head start! I needed/wanted this to work across several views so I took a lot of your node and a little of another's and came up with this;
ReplyDelete# Created by DPSDesign, dpsdesign.org
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
viewName = Autodesk.Revit.DB.View
items = UnwrapElement(IN[0])
views = UnwrapElement(IN[1])
#create graphic overrides properties
gSettings = Autodesk.Revit.DB.OverrideGraphicSettings()
#deconstruct DS Color Object and convert to RevitAPI color
dsColor = IN[2]
colRed = dsColor.Red
colGreen = dsColor.Green
colBlue = dsColor.Blue
color = Autodesk.Revit.DB.Color(colRed, colGreen, colBlue)
#set Projection Line color
gSettings.SetProjectionLineColor(color)
# "Start" the transaction
TransactionManager.Instance.EnsureInTransaction(doc)
#apply color override to elements in an input list
for view in views:
rView = view
for item in items:
rView.SetElementOverrides(item.Id, gSettings)
# "End" the transaction
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable
OUT = IN[0]
Thanks Greg! I'll check this out and get it added.
ReplyDelete