i would like to get a list of all preselected elements using dynamo. so far all nodes need to click select button and draw a box. I cannnot tab and select connected and unselect some elemets. This is hsouldbe dable but I cant find a node to do this.Can someone tell me if anyone has done it before?
Hello @splaw9 and welcome
spring node have one get current selection, could probably help
“ꟿ SelectElementsInOrder“ in springs node may help you
with it you can click slection button to select multi familyinstances
Version of Revit might matter here, as the selection nodes were revised in recent builds.
yeah sure, spring is buld with 2.7…here for cpython 3
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
def output1(l1):
if len(l1) == 1: return l1[0]
else: return l1
selid = uidoc.Selection.GetElementIds()
OUT = output1([doc.GetElement(id).ToDSType(True) for id in selid])
I have spring nodes 210.1.1 installed but I type in library search "ꟿ SelectElementsInOrder” nothing came out. I found a 3 Springs Nodes packages. as shown below. Did I get the right Spring nodes ? I installed all the 3 packages.
Spring nodes is the one you want.
I finally Found the Springs nodes under Library → Springs→ Revit→ Selection→Current Selection→Current Selection. I will try it out . Thanks everyone or helpful reply.
Elton,
Thanks. That helps to explain What the refresh means. I tried both True and False.Most ofthe time it is better to use true. Thanks
Yes. this script does work. I put it into the python script node but retains some of the template.I will try to examin the script. I previously trie it but didnt suceed.
allright, try play around with it
or just use spring
Hi Elton,
The problem with the Collect.CurrentSelection is the need to toggle the true and false to refresh and get a latest elements. Is there an automated way to do this ? Seems not that elegant. Thanks
Force execution in tuneup, or use Dynamo Player.
Hi Jacob,
What is force execution in tuneup?
The tuneup view extension has a method to re-execute all nodes. Newer builds have it incorporated by default in the extensions menu. And older builds can install it from the package manager (make sure you get the right build for your Dynamo release).



