Ungrouping & Purging All Families in a Model

It would also be interesting to get some feedback over this:

Hi @Dimitar_Venkov, How can I access to the old forum? Thanks

3 Likes

@Einar_Raknes I tried this definition you had written some time ago… I don’t get how to fix this issue with this line

for e in elements:
_ famdoc = doc.EditFamily(e)_
_ fec = FilteredElementCollector(famdoc).OfCategory(BuiltInCategory.OST_IOSModelGroups).WhereElementIsNotElementType()_

he prints out this error out of the definition:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. _
Traceback (most recent call last):
_ File “”, line 31, in

Exception: The document is currently modifiable! Close the transaction before calling EditFamily.

Dynamo is not the best tool to edit different Revit documents, but you can try to add TransactionManager.Instance.ForceCloseTransaction() before the for loop.

Thank you. If it still doesn’t, Should I unload the different documents I have linked in the project or what?

Nope. Encountered the same issue, what shall I do? I tried to unload the other links in the project but no luck with that

dynamo_colston_01

I tried also to use your old version (the one without the reloading step) and neither that worked, gave me this

Exception: The model could not be saved: (COleException 0x80030002)