Select model elements node - how to select multiple times?

i need to select multiple times instead of just one go, didn’t notice this issue before as normally i can select needed ones by crossing or window, such a basic UI requirement so i must miss something simple!?

Look into data shapes and its Selection inputs. I believe this is one of the easiest ways to set up more than one selection stage. The Revit API can do this also in stages but it requires some fairly advanced code using some UI related class/methods.

thanks Gavin, i don’t believe 3rd party package or API is even needed! well, i may just temporarily isolate needed elements and “Select Model Elements” in one go, hope Dynamo team can do something about it, i noticed this issue long time ago but didn’t pay much attention.

Its to do with the way dynamon runs - it needs to run the script in full so you need third party or python to stop the script and trigger a UI selection to occur partway into that process.

right, that’s what i thought too, similar to Forge (APS), no UI, that’s why data shapes is powerful, i’ll try Python node in the future which hopefully can solve this issue as API can be utilized, perhaps i can just reverse-engine data shapes which seems Python based, thanks again Gavin for the insight.

Springs package has a “current selection” node. Which is just a slight reverse in logic where you would select the elements and then run the script.

This way you can select everything like you normally would in revit.

Edit*
Err… sorry, just re read your initial post. My comment is useless… go me

I bave a node in crumple called prefilteredselection or thereabouts which i built to emulate data shapes. It takes in categories, triggers a selection limited to them and then passes the selection on. You can stage these in order if you delay the categories input usinf your upstream data flow.

Can you give an example as to ‘why’ you need to do multiple selection actions?

I “solved” this for me with multiple select models nodes and put that in a list.

well, simply elements cannot be selected at once by window or crossing

very cool indeed! but it’s still a workaround, besides, you don’t know how many “Select Model Elements” needed

So you want to point and click many times?

right, either Revit UI way (Ctrl/Shift to add/remove) or Revit API way (PickObjects).
solved w/ Python node thanks to comments by Given.
will be great if OOTB “Select Model Elements” node can allow multiple selecting instead of just window/crossing

2 Likes

try this:

Enable Python support and load DesignScript library

import clr
clr.AddReference(‘ProtoGeometry’)
clr.AddReference(‘RevitServices’)
clr.AddReference(‘RevitAPI’)
clr.AddReference(‘RevitAPIUI’)
clr.AddReference(‘RevitNodes’)
from Autodesk.Revit.UI import *
from Autodesk.Revit.DB import *
import Revit
clr.ImportExtensions(Revit.Elements)
from RevitServices import *
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
clr.ImportExtensions(Revit.Elements)

view = doc.ActiveView

parameterValues =
sel1 = uidoc.Selection
obt1 = Selection.ObjectType.Element
msg1 = ‘Pick elements in the desired order, hit ESC to stop picking.’

flag = True
elms =

while flag:
try:
ref = sel1.PickObject(obt1, msg1)
elms.append(ref)
except:
flag = False

OUT = elms

thanks SHIBUJOSE, i used PickObjects instead of PickObject so no need of while loop