Hi, I have researched many posts similar to my problem to no avail and really need assistance.
I am trying to write a formula with 3 Yes/No Visibility Options.
IF Length <600 - No Option Selected
IF Length between 600 & 1200 - Option A
IF Length >1200 - Option B
When Option A is ON, Option B is OFF.
When Option B is ON, Option A is OFF.
Please can you help me!!
Thanks
Liam
Solved! Go to Solution.
Solved by Ilic.Andrej. Go to Solution.
It is a nested IF statement:
if(Length<600,No Option,if(Length<1200,Option A,Option B))
Define the yes/no parameters which control the visibility of objects, then assign them all formulas in this manner.
For example:
param a: if(Length<600,0,if(Length<1200,1,0))
param b: if(Length<600,1,if(Length<1200,0,0))
param c: if(Length<600,0,if(Length<1200,0,1))
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
in this example I have 2 instance parameters (yes/no) associated to another instance Parameter type (Electrical Potential)
it could be your parameters are out of sequence or not associated back to the Length Parameter.
are you getting any warnings about formulas ?
you have 3 options but only 2 variables option A&B check the syntax of your formula.
Hi Dr Grozozo,
The No option isnt actually an option as such, it is more a case of if the parameters of Option A or B are not met that is the state it will be.
Liam
Ok So I have attached a screen shot of what i would like the formula for option A to do hypothetically but not sure how to write it. Please find attached.
Turns option A on or off: if(Length<600,0,if(Length<1200,1,0))
Turns option B on or off: if(Length<600,0,if(Length<1200,0,1))
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
in my example I place the formula in the driving parameter (length)
then set my options in the yes/ no parameter using only 1 to define if it is A or B
look at my image and translate to suit your needs
can you share the family for review?
Hi Kadmonkee,
Please find the family attached.
The problem im facing is that because as it is a line based generic family, i need to stretch the length for it to work. Using your formula (amended) the length is greyed out. If i stretch it the formula breaks down.
Thanks
Liam
Hi,
Ive tried inserting these formulas but its not accepting it saying inconsistent units, is there another line of formula missing? I have attached the basic famly could you try to amend it for me please?
Liam
My formula should work but nooo, Try this, it works, i tested it:
Option A: if(Length < 600 mm, 1 = 0, if(Length < 1200 mm, 1 = 1, 1 = 0))
Option B: if(Length < 600 mm, 1 = 0, if(Length < 1200 mm, 1 = 0, 1 = 1))
Instead of just using 1 or 0, providing a switch value, let Revit evaluate the true/false result as a math problem to solve. 1 is equal to 1, that's true. 1 is not equal to 2, that's false.
Revit, good old Revit....
Andrej Ilić
phonetical: ændreɪ ilich
MSc Arch
Autodesk Expert Elite Alumni
Dr Grozozo you are an absolute Legend!! works a treat! many thanks for your help!!!
Liam
is the intent of this family to be nested into another family ?
I modified the family a bit attached to this post
renamed it so you can compare the 2
when testing the formula in the properties uncheck the Option A box to activate Option B watch the value change
Can't find what you're looking for? Ask the community or share your knowledge.