# Mass save model groups to path

**URL:** <https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [October 17, 2017, 1:00pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704 "2017-10-17T13:00:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenRobinson\_HB](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@BenRobinson\_HB](https://forum.dynamobim.com/u/BenRobinson_HB)\
**Post date:** [October 17, 2017, 1:00pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/1 "2017-10-17T13:00:38Z")

</div>

Hi All,

I am working on a project that has 60 + flat layouts drawn in model groups. The team are manually exporting these from a flat type model into the the given building models and its a slow process.

I am looking to take the given model groups and mass save them to a Folder.

I have found this thread on saving Revit families to a path. but i do not have enough knowledge yet of the API to adapt it to be able to save .rvt model groups.

Any direction would be appriciated?

> [@Save Families from Revit to a Path](https://forum.dynamobim.com/t/save-families-from-revit-to-a-path/3983/3):
>
> A very similar topic was already discussed here: building up from that example, all you need to do is use the “SaveAs” method of the family document: Here’s the code: import clr clr.AddReference('ProtoGeometry') from Autodesk.DesignScript.Geometry import \* clr.AddReference('RevitAPI') import Autodesk clr.AddReference('RevitServices') import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc …

Thanks

Ben

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [October 17, 2017, 1:07pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/2 "2017-10-17T13:07:01Z")

</div>

I’d hate to disappoint you, but there doesn’t seem to be a method to save a group out to a file in the API, even though there’s a method to do so through the user interface. There seems to be a postable command but that won’t help you for automating the process.

One thing you could try is possibly automating the export with the help of a journal file.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 17, 2017, 1:07pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/3 "2017-10-17T13:07:03Z")

</div>

So you’re looking to script the save as library function?

Try this first:

> **[Save Groups](https://help.autodesk.com/cloudhelp/2015/ENU/Revit-Model/files/GUID-D7F1AEEB-A35D-418F-AF85-F6CF62CEBA2D.htm)**
>
> You can save a group as a project file (RVT) if you are working in a project, or a family file (RFA) if you are working in the Family Editor.

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [October 17, 2017, 7:35pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/4 "2017-10-17T19:35:32Z")

</div>

That only does one Group at a time.

Whitehead (?) developed a journal file (at least it sounds like a journal file) to achieve this. I don’t think he’s made it publicly available, however.

---

<div class="post-metadata">

**Author:** ![BenRobinson\_HB](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@BenRobinson\_HB](https://forum.dynamobim.com/u/BenRobinson_HB)\
**Post date:** [October 18, 2017, 11:05am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/5 "2017-10-18T11:05:19Z")

</div>

Hi Jacob

that is the workflow currently but it needs to be repeated 100+ times. So the aim is automated the AsLibary Group process

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 18, 2017, 1:39pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/6 "2017-10-18T13:39:00Z")

</div>

I guess I misunderstood the scope some…

I haven’t tested this so it may not work and there could be a few lumps along the way. Consider making a Revit file with model text that matches the group name as a test as I’m sure your stuff will take longer to work with. But you could try this.

1. Save a new copy of the file so you can go back in case of failure. It’s likely that no one will be able to work in this file during step two anyway.

2. Group all the groups. Yes this could be bad as nested groups cause issues like the really leader gremlin from the late 80’s movie ‘Gremlins’. Hence step 1.

3. Save out the nested super group as a library.

4. Open that file and ungroup the super group. You now have a file (non-work shared) with nothing but the groups you wanted to save out. Ensure there are no nested groups once you purge the super group. If there are than kill them off by exploding selected instances as they will cause issues with step six. You may want to consider using nested families to produce that type of behavior in the future as they are more stable, reliable, and in my experience behave better from a programatic perspective.

5. Use Dynamo to count the number of groups, and copy the file that many times, using the group name or number or whatever identifier you were planning on for each file.

6. Use Dynamo and a backround open process method to select all groups, filter out ones with a name or number or whatever identifier you are using that matches the name of the file being processed, and delete everything other group.

7. Verify your results and purge unwanted/content for all files.

This is likely worth some additional conversation prior to proceeding as I could be overlooking something obvious.

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [October 18, 2017, 8:36pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/7 "2017-10-18T20:36:50Z")

</div>

Interesting workaround!

I would add a 1.5… create a Dynamo script to place all the groups.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 18, 2017, 11:00pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/8 "2017-10-18T23:00:40Z")

</div>

Doesnt saving out the super group as a mode group produce a model with the single super group (and all contained groups) already placed? Or is the intent to move the groups to the origin? Really I’m kinda lost by the overall workflow as it’s quite a bit different than my usual method.

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [October 18, 2017, 11:20pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/9 "2017-10-18T23:20:09Z")

</div>

You can’t make a Group of unplaced elements. The Groups first need to be placed, then they can be Grouped.

Do you not use Groups?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [October 19, 2017, 1:47am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/10 "2017-10-19T01:47:29Z")

</div>

> [@Greg\_McDowell](#):
>
> Do you not use Groups?

Typically I avoid them, as they are usually a shortcut that causes problems.

My understanding is that grouping the already placed groups into supergroup, then saving the super group out as a library will create a file with the super group containing all the previously placed groups in place inside the super group. By unbundling the super group the groups will be in place right?

I’ll test this out tomorrow. Maybe do a screencast or something.

---

<div class="post-metadata">

**Author:** ![Greg\_McDowell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/greg_mcdowell/32/21011_2.png) [@Greg\_McDowell](https://forum.dynamobim.com/u/Greg_McDowell)\
**Post date:** [October 19, 2017, 4:46am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/11 "2017-10-19T04:46:50Z")

</div>

Yes, that’s correct. I was assuming that the groups hadn’t been placed yet.

Groups are great provided you don’t use non-system hosted families or line-based families.

---

<div class="post-metadata">

**Author:** ![JustinStirling](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/justinstirling/32/79001_2.png) [@JustinStirling](https://forum.dynamobim.com/u/JustinStirling)\
**Post date:** [April 2, 2020, 10:44am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/12 "2020-04-02T10:44:32Z")

</div>

Is anyone aware of a method that works for saving model GroupTypes from a project out to a file directory in mass with Dynamo, rather than doing one at a time with File\>Save As\>Library\>Group?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 2, 2020, 10:49am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/13 "2020-04-02T10:49:54Z")

</div>

Give a shot to the list of steps I posted above. There still doesn’t appear to be any API for this at the moment so that type of work-around will be required.

---

<div class="post-metadata">

**Author:** ![Ron\_Allen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ron_allen/32/124849_2.png) [@Ron\_Allen](https://forum.dynamobim.com/u/Ron_Allen)\
**Post date:** [May 6, 2020, 8:04pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/14 "2020-05-06T20:04:39Z")

</div>

@jacob.small Any update for this in the 2020 or 2021 API or Dynamo for Revit 2.0?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 7, 2020, 10:29am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/15 "2020-05-07T10:29:22Z")

</div>

Not that I am aware of. I haven’t checked the 2021 API very closely yet though.

---

<div class="post-metadata">

**Author:** ![nnguyen](https://avatars.discourse-cdn.com/v4/letter/n/97f17d/32.png) [@nnguyen](https://forum.dynamobim.com/u/nnguyen)\
**Post date:** [April 26, 2021, 6:52pm UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/16 "2021-04-26T18:52:34Z")

</div>

@jacob.small  
Trying to do what you suggest.  
Any ideas when I am trying to save as from supergroup.rvt into multiple rvt with given names of “smaller groups” ?

 ![save as group](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/c/3ce29f4c423171dd26742330040a89f808788987.png)

Thanks

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [August 17, 2023, 7:01am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/17 "2023-08-17T07:01:59Z")

</div>

Hi all, is there any way with revit 2023 to save all model group types available in the project to a folder? Thanks in advance. Cheers

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 17, 2023, 7:37am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/18 "2023-08-17T07:37:37Z")

</div>

Nope. See the steps above.

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [August 17, 2023, 8:17am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/19 "2023-08-17T08:17:25Z")

</div>

Thanks @jacob.small and any plug-in available ? Cheers

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [August 17, 2023, 8:20am UTC](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704/20 "2023-08-17T08:20:55Z")

</div>

No idea. Best to ask in a forum for add-ins or general Revit stuff rather than the Dynamo forum.

[Next page](https://forum.dynamobim.com/t/mass-save-model-groups-to-path/15704.md?page=2)
