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: 

Conditional Statement Help for reading two different Height options

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Jason_S
348 Views, 6 Replies

Conditional Statement Help for reading two different Height options

I am having a difficult time getting something to work with a family.  I have two Yes/No parameters if one is checked I want the Total Height Parameter to read a different height parameter.  See attached.

 

If the Middle Shelf On is check I want the Total Height to read the Height parameter.  But if the Array Shelving Off is checked I want the Total Height to read the Array Shelving Height parameter.

 

I can get the Total Height to read one or the other by doing a statement like this  if(Middle Shelf On, Height, 0')

 

I just can't get any further than that without it showing error messages.

 

Thanks for the help

6 REPLIES 6
Message 2 of 7
CoreyDaun
in reply to: Jason_S

You have to use a nested IF/THEN statement. Which Yes/No Parameter has higher priority?

 

If "Middle Shelf On" does, then for the formula for "Total Height" use:

if(Middle Shelf On, Height, if(Array Shelving Off, Array Shelving Height, 0'))

 

If "Array Shelving Off" does, then for the formula for "Total Height" use:

if(Array Shelving Off, Array Shelving Height, if(Middle Shelf On, Height, 0'))

 

Another issue is: do you really want this parameter to read 0' if neither parameter is checked?

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 3 of 7
Jason_S
in reply to: CoreyDaun

Thank you Thank you,

 

I was putting the parenthesis in all the wrong places.  These work great.

 

I also changed the 0 to the minimum Height if none are checked.

 

Thanks again.

Message 4 of 7
CoreyDaun
in reply to: Jason_S

Anytime! But for the sake of thoroughness - what if the user has BOTH of the options checked? With the previous formulas, one option or the other will be totally ignored.

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 5 of 7
Jason_S
in reply to: CoreyDaun

OH!!!!!  I didn't think of that, and knowing how things work here that will happen more than I thought about.

 

Is there a trick that if one is checked the other will uncheck itself so this can't occur?

 

Now my condition statement experience is tossed out the window.  LOL

Message 6 of 7
CoreyDaun
in reply to: Jason_S

Well, there no way to directly force one to uncheck. If you wanted to always have one of the two options checked, that would be doable. But it is valid to have neither option checked, right?

 

One method to achieve this is to introduce another Yes/No parameter called "Shelving" and leave the other two there to specify the options. Add a formula to the Array Shelving parameter " not (Middle Shelf On) " to ensure that only one of those is ever checked.

 

Then, the primary formula will become:

if(and(Shelving, Middle Shelf On), Height, if(and(Shelving, Array Shelving Off), Array Shelving Height, 0'))

 

Also, why is one of the options label as "ON" and the other as "OFF"? Why not just "Middle Shelf" and "Array Shelving"?

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 7 of 7
Jason_S
in reply to: CoreyDaun

Thanks

 

I took out the Off and On.  That was left over from the older family and I wanted to get it working prior to cleaning it up.

 

I found if I have both check marks checked the primary option is the default so I am going to leave it as it was.

 

I really appreciate your help and knowledge. 

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

Post to forums  

Autodesk Design & Make Report


Autodesk Design & Make Report