Mass save model groups to path

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.

2 Likes