Ungroup the elements by selecting the directory

I am trying to ungroup the elements by selecting the family files from the directory. Once the changes are made, I try to save those family files in the save directory. However, I am facing issues when I try to ungroup the elements. The error message is: Warning: Group.UngroupElements operation failed. Attempt to modify the model outside of transaction. Can anyone suggest how to resolve this issue?

Ungroup elements in document - Revit - Dynamo

Ungrouping is an action that requires a transaction in the Revit API (which, in turn, needs a document reference). The Ungroup node uses the current document for that. For it to work on other documents in the background, you would have to pass the respective model‘s doc reference. I am writing this from my phone so I can‘t be more exact than this but you could look at some of Clockwork‘s selection nodes (that have optional doc inputs) on how to modify the node to better suit your needs.

By Andreas_Dieckmann

Hi Pradeep, welcome to the Dynamo forum :wave:

I would look at using Bird Tools | Dynamo Multiplayer for processing a folder of Revit families.