I have several families with the same shared parameter, which I’ve to add a formula and recharge into the project.
The idea is simple…open the families, modify the parameter, save and load back…but a strange error appears: "Warning: Formula.Set operation failed. A sub-transaction can only be active inside an open Transaction.
Besides, the error occurs only into a one single family, the other one works…Could anybody help me out? This is the first time I use DataStream.Await node, cause “if” node didn’t work without reason.
Thank you a lot
What is the parameter typ?
What is the result when you do it manualy.
to a “text” parameter you can`t add a forumlar
My guess is the node may not be written properly or to receive the data structure you’re giving it. That error usually occurs if you try to modify a document but reference another one in the actual transaction making that change.
Hi, thanks for your response. The parameter type is number type
if I do everthing manually there is no problem
So…there’s no way to modify a family “externally” (without open .rfa document manually) and load it back to the current document ?
I’ve done this for families from a directory before without issue, can’t see why edit/modify/load wouldnt work similarly if Revit sees them as family documents. Orchid package has nodes for all those steps, I’m not sure which package the node you’re using is from.
This is my workflow for reference from directory:
I just noticed you’re passing through incorrectly actually. Pass through the original family doc to the save node first after the formula set, then do the same for load. Currently your script tries to do all three at once. I use a passthrough in this workflow in the right way for reference:
Thanks @GavinCrump , I was missing that silly error. Another point was, the node Formula.Set must be launched when Revit opens the families, and it takes a bit long so I had to add a datastream.await extra node to assure setting the formula only when families are opened and not before
I drop here the script…maybe someone finds it useful
add shared parameter to families.dyn (31.7 KB)