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:
Hi @Kulkul,
Thanks for the code (& I know this post is a bit long in the tooth)
I did a bit of a refactor as the for i in elements: only needs to iterate over the original elements to create the list, otherwise it is calling the selection multiple times (getting larger as it goes)
Cheers
Mike
@zalgirietis.minde, unfortunately at this time highlighting of elements in linked files is not exposed in the API
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from System.Collections.Generic import *
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
def select(items):
if isinstance(items, type(None)): # Select none
items = []
elif not hasattr(items, "__iter__"): # Check if single element
items = [items]
ids = List[ElementId](i.Id for i in items)
uidoc.Selection.SetElementIds(ids)
return "Success"
OUT = select(UnwrapElement(IN[0]))