Hi everyone,
I am working on a Dynamo workflow where I first collect Revit families based on their Family Name, then retrieve their Family Types and the corresponding elements in the Revit model.
As shown in the attached image, I am currently using:
Family.ByName → Family.Types → All Elements of Family Type
This gives me the elements associated with the selected family types.
Now, I want to select/highlight these elements directly in the Revit model from Dynamo.
Is this possible using Dynamo? If yes, what node or method should I use to select or highlight the resulting elements in Revit?
I would appreciate any guidance or example workflow.
Thanks.
There is a node Select in Revit.
I believe the is also a node to Isolate.
Also you can fill in a Parameter with a key and use that key for a filter.
Sooo, many options
.
You can also click the green highlight to ‘zoom’ to a view which has the element open, centering the view on the element’s bounding box.
Here’s a python example - selects every instance of a single selected element by it’s type in the active view
import clr
from System.Collections.Generic import List
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
uiapp = DocumentManager.Instance.CurrentUIApplication
uidoc = uiapp.ActiveUIDocument
doc = uidoc.Document
selected_type = UnwrapElement(IN[0])
bip = ElementId(BuiltInParameter.ELEM_TYPE_PARAM)
pfrf = ParameterFilterRuleFactory.CreateEqualsRule(bip, selected_type.Id)
epf = ElementParameterFilter(pfrf)
element_ids = FilteredElementCollector(doc, uidoc.ActiveView.Id).WherePasses(epf).ToElementIds()
element_ids = List[ElementId](element_ids)
uidoc.Selection.SetElementIds(element_ids)
OUT = element_ids
So you want to isolate the elements first based on criteria and then select just from those isolated elements.
Here is a post from 2016 that has a link to a python script that isolates a category first. It would likely need to reworked for your situation and to bring it into 2026 coding changes.

