Select Elements in REVIT by the IDs


I’m a beginner with Dynamo and I have a selection problem.
I readed a script which select all ID element of elbow 45°. After that I would like to Select all these elbows in my REVIT Workspace to display and change a loss pressure parameter.
I tried to change directly this parameter in dynamo but loss pressure parameter can’t be change easily.
I also tried to use CAAD_RWTH nodes and it doesn’t work.
I’m on REVIT 2016 and Dynamo

Here my script

and here the result that I would like. (On this screenshot i selected manually all the elbow)

Thanks to your help


you can use this:

the select in Revit is from springs

Thank you ! This method works very well and very easily !

Do you or any other kind fellow know where this node went (“Springs.SelectInRevit”)? WOuld very much appreciate having it or any equivalent in my toolbox.

1 Like
import clr
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# Import RevitAPI
from Autodesk.Revit.DB import *

# Import ToDSType(bool) extension method
import Revit
# Import ToProtoType, ToRevitType geometry conversion extension methods

# Import DSCore nodes in Dynamo
import DSCore
from DSCore import *

# Import python library
import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
import os
import shutil
import math
# Import math library
from math import *

#Import Data and Time
from datetime import datetime
now =

#Import System Library
import System
from System.Collections.Generic import *
from System.IO import Directory, Path

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

#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])
ids = List[ElementId]()
#Do some action in a Transaction
for ele in element:

#Final output
OUT = uidoc.Selection.SetElementIds(ids)

Believe this code can work with what you want

1 Like