Adding formula to Revit families

Hi
I am trying to create a scrip to add fomulas to multiple families. I am following the principles from an earlier topic Changing/adding Formula to a parameter in Familyfile

When I run it, it say invalid fomula. Does any know, why this is happening?

@sfiYP5HX What’s the StorageType of parameter “Category_Type_ED”…??

For string formulae you need to have double double apostrophes as the formula includes those. One easy way to do this is using a string node and typing the " in it, or you can escape character them like “"formula"”

Aarh. @GavinCrump I had to read your comment a couple of time before I fully understand why thats the reason. Thanks alot. unfortunately I got a new issue I have to look into :slight_smile:

Try as Gavin mention and a passtrough before you close

1 Like

Im not sure thatll have an impact as the close node has to wait for the formula node to pass on the documents.

@sfiYP5HX Usually i see that error when im running a task in a document that isnt available. Ensure that the documents are all opened/closed in a single run and also that you dont have one of them open prior.

Its an orchid node so not sure if maybe its an orchid specific issue, in which case we typically recommend going to erfajo’s github and logging an issue if it cant be solved here simply.

1 Like

yeah…for me it looks like ootb nodes…family document nodes , but not sure

thanks @sovitek I still get the error as before, but your passthrough idea solved the problem anyway :stuck_out_tongue: