Parameter Formulas

Parameter Formulas

Anonymous
Not applicable
782 Views
6 Replies
Message 1 of 7

Parameter Formulas

Anonymous
Not applicable

Hi,

 

In the attached Family I'd like the user to have the option to check "Right Door Open" to show right door open, in which case the left door would be closed, and vice versa.  But both right and left doors cannot be open at the same time but they can both be closed at the same time.

 

I think I've gotten pretty far if you look in the Family Types but I start to stumble with the conditional aspect.

 

Thanks,

Jeff

Accepted solutions (1)
783 Views
6 Replies
Replies (6)
Message 2 of 7

RDAOU
Mentor
Mentor
Accepted solution

@Anonymous

 

Left Door Angle = if(not(Left Door Open), 0°, if(Right Door Open, 0°, 82°))

Right Door Angle = if(not(Right Door Open), 0°, if(Left Door Open, 0°, 82°))

 

This should let 1 open at a time and if both are check then both will close till 1 is unchecked

 

This would be the simplest if it works for you; otherwise, more parameters need to be added to uncheck first door if second gets checked...

 

Or what did you have in mind?

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 3 of 7

Anonymous
Not applicable

@RDAOU

 

Your solution does exactly what you said... prevents both doors from being open simultaneously and yes that absolutely works for me.

 

As far as the additional parameters... guessing I add "control" parameters with formulas to uncheck one if other is checked.

 

I'll look around...

 

Thanks for your time!

0 Likes
Message 4 of 7

RDAOU
Mentor
Mentor

@Anonymous

 

Well you can add another parameter formula to uncheck first door if second gets checked...but this will leaves you with one yes/no checkbox which flips opening (ie: one is always open with no option to close both)

 

Same for the above but add the following:

 

Left Door Open = if(Right Door Open, 1 > 2, 1 < 2)

 

then rename the Right Door Open to Flip Open

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 5 of 7

Anonymous
Not applicable

I see.

 

Hmmmm, thinking from a different angle... it'd be even better to give the user a drop-down picklist:

 

  • Left Door open
  • Right Door open
  • No doors open

Forget checkboxes all together... well sort of but use something similar to using integers to control checkboxes as this gentleman lays out in post 8/22: http://forums.autodesk.com/t5/revit-mep/if-then-formula-and-quot-yes-no-quot-parameter/m-p/3818889#M...

 

 

 

0 Likes
Message 6 of 7

RDAOU
Mentor
Mentor

Well with just two variables Yes/No works fine; but when the tend to be too many it kinda gets too hard/complicated to control them same like probabilities with

 

  • With 2 variables its either
    1. ON ; OFF
    2. OFF; ON
  • with three it becomes
    1. ON,OFF,OFF
    2. OFF,ON,OFF
    3. OFF,OFF,ON
    4. ON, ON, OFF
    5. OFF, ON, ON
    6. ON, OFF, ON
    7. ...and it goes more complicated

So yes; if you are planning to built more functionality Yes/No is not the best call

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 7 of 7

Anonymous
Not applicable

And if I was to tread those waters would I use nested IF statements?

0 Likes