Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set Yes/No Visibility Parameters within a range of Lengths

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
Anonymous
3153 Views, 11 Replies

Set Yes/No Visibility Parameters within a range of Lengths

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

11 REPLIES 11
Message 2 of 12
Ilic.Andrej
in reply to: Anonymous

 

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

Message 3 of 12
kadmonkee
in reply to: Anonymous

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.

 

Yes No Parameter.PNG






If there is any information shared that is of value please give Kudos
If a solution is provided by any posters please mark them as Solved to benefit everyone else.
thank you
Message 4 of 12
Anonymous
in reply to: Ilic.Andrej

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

Message 5 of 12
Anonymous
in reply to: kadmonkee

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.

Message 6 of 12
Ilic.Andrej
in reply to: Anonymous

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

Message 7 of 12
kadmonkee
in reply to: Anonymous

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?






If there is any information shared that is of value please give Kudos
If a solution is provided by any posters please mark them as Solved to benefit everyone else.
thank you
Message 8 of 12
Anonymous
in reply to: kadmonkee

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

Message 9 of 12
Anonymous
in reply to: Ilic.Andrej

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

Message 10 of 12
Ilic.Andrej
in reply to: Anonymous

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

Message 11 of 12
Anonymous
in reply to: Ilic.Andrej

Dr Grozozo you are an absolute Legend!!  works a treat! many thanks for your help!!!

 

Liam

Message 12 of 12
kadmonkee
in reply to: Anonymous

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

 






If there is any information shared that is of value please give Kudos
If a solution is provided by any posters please mark them as Solved to benefit everyone else.
thank you

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report