Removed family formula in bulk

OK… hands up just started with Dynamo and struggling a bit so hopefully someone can help!

I have a lot of cable tray fitting families that i would like to be able to remove a formula from the family without opening each one up. They are kind of hard coded with a '=bla bla bla" in the formula so it can not be modified via revit schedule.

Any help would be much appreciated.

Cheers

Ben

You cant do that, since formulas live in the family… Only option is to open the family and remove the fomula.

2 Likes

If parameters are the same name in all of the families, you should be able to background open, assign new values, and close the family. You can do that to an entire directory. Here is an example of a similar revit to dynamo interaction.

Thanks Scott… been through loads of you tube videos and he is very good… hope to understand Dynamo as well as him someday 8o).

Still struggling…this is what I have built so far… (should have put it in my original post)

Open file location (containing the families).> code to delete parameters that I don’t want & a code to remove formula from the parameters that I don’t want > wait till its done > save the file.

tested it and it working without the open and closing of the files. will try and put the two dynamo scrips on this post to see… second image is the working one without the open and close

Any thoughts?

Cheers Ben

Sorry erfajo my post wasn’t as clear as it should have been. When I said I didn’t want to open each one up I meant that that I didn’t want to open the family and run a scrip then open another one and so on.

Would be great if you could do it through the model but was prepared to point to a file location with the families in it.

Have included my dynamo scrip below just cant get the open and close to work correctly

Well, then I have a series of familydocument nodes, and at some point (much much later) did someone also code som ootb nodes for familydocument.
At my github do I have a sample collection, and since I can see you have found my package, you should be able to find the samples as well… but I will presume that there also exists some example here in the forum.

However, when I see your GRAPH (not script) you close the background open file before you remove the formula… add a new “AWAIT” node (not codeblock) at the output port (boolean) and pass the file. There is also some kind of error in the delete node.

3 Likes

Thank you for taking the time to reply. This is my first real dynamo experience so very much a shinny and new user 8O). I will try and take your advice on board but honestly I don’t fully understand… I have only been getting my head around it for a few days. Would it be too much to ask for an example Graph so that I can see how it should work? Thank you in advance if you can.

Try using @L1 for family document and @L2 for parameter names with longest lacing. Also use a second passthrough for the formula remove so that you only close documents afterwards (as opposed to making a race condition).