How to set 'Formula' for parameters in family


#1

Hi,

I need to set a value to ‘Formula’ field for some parameters in a family. I just tried using the script for setting ‘Value’, by replacing p.Definition.Name by p.Formula. But no luck. I am totally new to Python, though.

Can anyone please let me now how to do this.

Thanks

Vasu


#2

Hi,

Anyone could help me on above query, please.

Thanks

Vasu


#3

Hi @Vasu ,
I’m affraid Formulas can’t be set through API :


Extract Parameters' formulas
#4

Hi @Mostafa_El_Ayoubi,

Thanks for responding. I tried the below script and it worked.

Thanks

Vasu


Create Parameters in a Revit Family
#5

Nice! Sorry for the misleading info :grin: . Maybe it got you looking elsewhere at least…


#6

Have just noticed this post… I have several nodes that can be used for working inside family documents… that can be used in combination with Rythm node for open and close.


#7

Erik, I have made good use of your nodes to set family parameters and it’s very handy in editing folders full of families, so Thank you very much for that. But I cannot figure out how to use the one that sets a formula.

In this example the parameter is a simple yes/no box, but I have tried it with numerical paramaters as well. Am I doing something wrong?

Tim


#8

Please start a new post… and please update your package, it is old :slight_smile: