Is it possible to set the parameter formulae for multiple families in single click and save?

Hi everyone,
I’m currently working on setting up parameter formulas for multiple families after checking the shared parameter box in Revit. However, I’m encountering a couple of errors with the FamilyDocument.SetFormula node:

  1. A sub-transaction can only be active inside an open transaction.

  2. Only the first family formula has been updated, as indicated by the output of the FamilyDoc.CloseAndSave node.

I’m wondering if it’s possible to set the formulas by loading the families into the project. Since I’m checking the shared box in the project environment and then trying to set up the formulas in the background without using Orchid Package Formula.Set node
Has anyone faced similar issues? Any insights or advice would be greatly appreciated!

Revit #BIM #ParametricDesign #Architecture


Thanks in advance for your help!

For starting a SubTrabcation, you have to first start a Transaction.

Try Transaction.Start node before the FamilyDocument.SetFormula node, and close the transaction later, using Transaction.End

Check out my node in Crumple package which is in Python. Most of my family document related nodes are still being tested but I know the setformula node works currently in 22-24 at least.

Hopefully that shows how to manage the transactions. I dont believe sub transactions are necessary as long as you start/close the transactions in each document being edited respectively.

Double post?

Yup…, I tried it but again i am facing the same sub transaction error.