Highlight elements in active view

Hi guys!

I want to Dynamo to highlight a certain element. So far I have used “Highlight Elements in View” from the JBE package. But I this gives the ID’s (atleast that is was it says). Can you access the visibility and graphics “filter” option from Dynamo in any way? Anywho this is how far I am so far:

Look for a node called “Element.OverrideColorInView” or something like that.

Hi @arbazhamayun

Are you looking for something like this?

YES exactly something like that. I have the list of elements. All I need is a way to highlight them :slight_smile:

@arbazhamayun Below is the Python code you can just connect your list of elements to highlight:

import clr

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *

import Autodesk
from Autodesk.Revit.DB import *

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

highlight = []
elements = UnwrapElement(IN[0])
elementsel = uidoc.Selection
result = []

for i in elements:
	Icollection = List[ElementId](highlight)
OUT = result

thanks alot Kulkul :blush:

1 Like

Hi @Kulkul
it gives me this error when i tried the above code.
are their any update to it…?


Check your input. If the elements input is only a single item, try turning it into a list first using a list.create node.

1 Like

Thank you @kennyb6 , that did it.

Hi! Does it work with elements of the linked model?

1 Like