Restore Group

My work in Revit includes ungrouping model groups that contains restore elements and then group it again with the same name.

Is there any way i can do it by Dynamo??

Thank you in advance

What do you mean by this?


1 Like

Keen to hear what @bvs1982 knows about how to do this in more detail…

Last i checked restore excluded was not exposed to the group class in revit API. Also if you regrouped elements you wouldnt be able to use the same name unless the original group definition got deleted as well first.

1 Like

Hellow sir @bvs1982,
My work is to update old revit models in to new template. I do it by schedules. But after completing schedules the groups says “elements are being excluded” , then i need to copy it’s name and ungroup it and then group it again with old name.

For example I’ve 50 groups in revit, i update old walls to new walls by schedules which cause elements to be exclude from that perticular group. If i click “Restore” then the old walls will be back. Lets say group name is XYZ, so i need yo rename it like XYZ_1, then ungroup it and then deselect refference planes from selected group elements and then group it as XYZ.

I should have be more clear @GavinCrump. I ment you can Ungroup and Regroup a Group.
You are right about the Restore Excluded.

But knowing you can Ungroup and Regroup maybe OP can find a workflow which works fo rhim.

I am curious about this though. How do you update the Walls by a Schedule?


like this first I create all wall types manually any then change it from schedules

I am still a bit confused. AFAIK you can’t change walls in Groups without Group Edit.

We can change the Group Elements by Schedules without editing group. but after changing group elements from schedules, it’ll show a warning like this

Ah, it is possible becasue you have only ONE instance of the Group in the project instead of multiple.

I can’t replicate this. Are you sure the Elements weren’t already excluded before the Wall change?

yes…so is there any way i can ungroup it and then group it by same name by dynamo when I’ve so many groups in revit model?

There are a few topic on the matter.

I am pretty sure it is possible, but it will require a few steps. Something like this.

  1. Ungroup.
  2. Regroup* with a new (temporary) name.
  3. Delete / purge the old Group from the Project.
  4. Rename the new Group (to the old name).


  1. Ungroup.
  2. Delete / purge the old Group from the Project.
  3. Regroup*.

*You can write the old Group Name to a Parameter of all the Group Members first and use that Parameter (with the old Group Name) to Regroup the Elements.


Let’s say group name is XYZ then the process is,

  1. Rename XYZ to XYZ_1
  2. Ungroup (so all old elements will be removed from selection)
  3. Group it as XYZ

And also i deal with like 100s of groups in one revit file so it’s very tedious process…so i was thinking if i can automat this process by dynamo somehow.

So yes.

I gave you some ideas and options.

Try making a graph.

I am happy to help, but you have to make the start :upside_down_face:.

It is a bit more difficult if you have a multiple instances of a Group in the project.


Thank you sir.

I’ve only one group instance.
let me explain my scope of work.
I upgrade old revit models of clients according to new template file.
client make model with groups indicating house or flats, like if 4 flats follows same layout the client make one group and make its 3 instances. but i need to duplicate every instance and name every group as their flat number.

Then start making a script @Div, this way people can help you where you get stuck. The forum rules clearly state this is not a forum to get scripts built for you, the goal here is to help people who are actively trying to learn about and use Dynamo.

1 Like

This is false. You can definitely create group types in the API with the same name as previous group types. We’ve used this before for clients who wanted group workflows by allowing both to exist temporarily and then removing the original group type definition.

Temporarily sure, but commiting it into the model without allowing for managing out the old one is what I meant. I would have thought revit wouldn’t be happy with supporting two group types with the same name in the model at once?

It allows it via the API for sure. I believe behind the scenes, Revit is managing this for us and I’ve seen both group types coexist without apparent issues. But yes, I would not suggest leaving both in the model.

1 Like