I have successfully “Frankensteined” scripts that perform various parameter manipulations on all families within a Windows directory (thanks to many examples here ). However, I’m stuck on what I think should be the simplest script…
I am trying to add a Family Parameter to all families in the folder. However, when I run the Dynamo script, I get the following error:
FamilyDocument.AddParameter operation failed. A sub-transaction can only be active inside an open Transaction. The script successfully adds the first parameter to the first family but then fails for the rest.
The issue seems to be with the way I am feeding families into the FamilyDocument.AddParameter node. This is the closest I have gotten to making it work. Originally, I used Gavin Crump’s (Crumple) FamilyDoc.Open node, however, it outputs Autodesk.Revit.DB.Document elements, while the FamilyDocument.AddParameter node requires input as Revit.Application.FamilyDocument, which can be retrieved via Revit.Application.Document but apparently not Autodesk.Revit.DB.Document.
I attached the dynamo script, image of the dynamo graph & the excel used by the script.
BIM-MAN-8_Parameter Create Family.xlsx (11.5 KB)
SOS-1.dyn (38.0 KB)
Appreciate any help