Duplicate and Rename Unplaced Detail Groups

Hi there,
I am trying to duplicate Detail Groups that are present in our template and rename them to automate this task. However, I am unable to view, and access existing Detail Groups that have not yet being placed into the model.
I have tried to use the Bakery node called List Groups but it only list placed groups. Is there any way to achieve that without using Python?
I thank you beforehand for your help and attention.

Kind regards, Haley

Start with an Element.Types node and select GroupType from the dropdown. It’s possible to call this via a string using the ElementType.ByName node in the Clockwork package if you’d prefer something which will be more stable between Revit versions.

Then use an All Elements of Type node ot get all your group types. You’re half way there, as this gets the model groups and the detail groups. Onto the filtering.

Each of these element types has a parameter for a family name. Use an Element.GetParameterValueByName to get the name of this family, and you’ll see there are only two options: Detail Group or Model Group. This string can be tested against for equality to “Detail Group” using an == node.

The resulting Boolean can be used in a List.FilterByBoolMask, the IN output from which will be the detail group types. The OUT output will be the model group types.

Thank you Jacob!

1 Like

I am trying to do the same thing, I have a number of Detail Groups that we use in place of Revit’s match line/view reference. I create the groups I need for all the levels for one discipline i.e. mechanical piping. Now I would like to duplicate these and replace the name with another discipline. ex. MP-101 View Reference would be duplicated and renamed to PL-101 View Reference. The final step would be to edit the new group and do a Find/Replace. Find: MP Replace with: PL. I tried the steps listed in this post but I didn’t get past Element.GetParameterValueByName. It found the GroupTypes but when I used “Detail Group” as the parameter name, the list was blank.
I am pretty new at Dynamo so any help would be much appreciated.