A blog dedicated to tidbits of software information related to the AEC industry. Most tips and tricks are roughly 60 seconds because, "Hey who doesn't have 60 seconds".
*The views and opinions expressed in this blog do not reflect those of my employer.

Wednesday, December 16, 2015

Rhythm Cleanup and Updates for Override Nodes

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

3 comments:

  1. Hi
    Is 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

    ReplyDelete
  2. 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;

    # 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]

    ReplyDelete
  3. Thanks Greg! I'll check this out and get it added.

    ReplyDelete