i noticed that Select Model Element(s) node(s) won’t work in group edit mode, i have to ungroup and regroup which is not the desired solution, any suggestions?
There is limited to no access to the API during group edit mode, as there is a transaction is started as soon as you start group edit, which prevents starting new API calls. Any attempt to circumvent this is apt to break your model in not good ways.
The alternative is to use the tools from outside group edit mode.
thanks, that’s what i thought, perhaps i should use (API) temporary transaction approach - rollback instead of commit, i believe no relevant nodes available?
Depends on the use case, but generally rollback in the context of Dynamo means you’re using a can of soup as a screwdriver.
What are you working on?
join 2 model lines in the group, those 2 lines cannot be filtered out, need to manually select
When you say ‘join two model lines’, you have two lines which are in the group which you want to select, extract the geometry from, and produce a single polycurve in Dynamo?
Got a base .rvt with a group containing a similar dataset?
this is due to Revit model lines limitation, very hard in 3D view to join 2 model lines w/ different elevations unless creating section/elevation view, basically edit the group to join 2 model lines
E323.rvt (492 KB)
So you’re joining them in Revit as objects, not extracting the geometry?
I’m still a bit lost on the desired ‘after’ state.
see updated RVT, group 1 is before state, group 2 is after state, but should still be group 1
E323.rvt (512 KB)
This is helpful.
You aren’t blocked by selection, but by editing the group, which is not supported by the API at this time. As such your best option for automating group edits is the following:
- Get all instances of the previous group type
- Rename the current group type
- Get an instance from the current group type
- Ungroup the instance and gather the new elements therefrom
- Transform or modify any of the ungrouped elements which need to be changed (moved, type changed, rotated, or deleted - be sure to remove from the list after deletion)
- Generate the new elements and add them to the list of elements
- Make a new group type from the updated collection of elements
- Set the new group type’s name to the previous name
- Change all remaining instances of the previous group type to the new one
- Remove the previous group type from the project
A quick FAQ:
- Does doing this mean that all elements in the group are ‘new’ so we’ll see a ton of changes in the document?
- Yes.
- Does doing this mean any element which references an element in the group (i.e. tags, hosted fixtures, dimensions, etc.) will likely be disassociated from the host?
- Yes, though sometimes you get lucky and a new host automatically resolves.
- Am I missing something, or does this mean the value of the groups are reduced drastically by preventing automation?
- No, this puts the value of groups at direct competition with the value of automation. We get to decide for A or B but not both.
- Is this why you don’t recommend using groups for anything which you might want to automate someday (which is pretty much everything these days)?
- Yes.
- Is this a known Revit API gap or a problem with Dynamo?
- This is a known Revit API gap and presents in add-ins as well; no Dynamo wizardry can fix it.
- Is this addressed in a future release?
- No, this isn’t addressed in 2026, and isn’t likely to be addressed in a coming release (though the dev team always likes to surprise us).