Parameter to control 3 checkboxes with overriding checkbox to control on/off. But still have the ability to turn off individual boxes is main one is checked

Parameter to control 3 checkboxes with overriding checkbox to control on/off. But still have the ability to turn off individual boxes is main one is checked

JacobDSimpson
Advocate Advocate
2,166 Views
5 Replies
Message 1 of 6

Parameter to control 3 checkboxes with overriding checkbox to control on/off. But still have the ability to turn off individual boxes is main one is checked

JacobDSimpson
Advocate
Advocate

Hello, 

 

Sorry If the wording on my title is confusing, I'll try to break it down as straightforward as possible what I'm trying to achieve.

 

I have 3 checkbox parameters controlling the visibility of different wall sections at the top of a work platform family. In some instances I'd like to have one or more of these on at a time, however there are times when I will not want any visible. Rather than having to select all 3 parameters to switch off I was hoping to create a main parameter that switches all 3 off at once, however I need the ability to control the 3 individual parameters if the main one is checked. 

 

If there are insights anyone may have for a formula to achieve the above results I'd be very grateful for your insight.

 

Currently, all of the formulas I try on the main parameter prevent any manipulation to the sub-parameters.

 

Thanks

0 Likes
2,167 Views
5 Replies
Replies (5)
Message 2 of 6

Alfredo_Medina
Mentor
Mentor

You can use integers. It has been explained here in other threads. Your visibility parameters A, B, C, are true only when your integer parameter is 1, 2, 3, respectively. So, to turn all the visibility parameters off, you set the integer parameter to 0.


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 3 of 6

M_Perez
Advocate
Advocate

You could achieve this in differents ways. It depends on how you are going to work with the family after that.

 

The simplest solution would be to build 3 additional parameters, which with a formula trigger if is on or off:

 

e.g. (7 Parameters for 3 options)

 

P1

P2

P3

None

P1_ = if (None, None, P1)

P2_ = if (None, None, P2)

P3_ = if (None, None, P3)

 

(also with AND or OR instead of IF)

If it a real improvement is something that you should evaluate yourself.

You may explain a bit more what you are trying to achieve. Maybe there is a better approach.

0 Likes
Message 4 of 6

Alfredo_Medina
Mentor
Mentor

Another approach is to assign values to each parameter. This gives you more flexibility. The value of the integer determines which parameters are on, by adding their values.

 

2021-08-20_10-07-24.jpg


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes
Message 5 of 6

RDAOU
Mentor
Mentor

@JacobDSimpson 

 

Too many parameters for a simple operation....In such a case I prefer to use a nested family for the wall partitions and control with a Family<Type> selector. 

 

3 Partitions A B and C = Child family with 7 types + 1 where all invisible

  • Type A
  • Type B
  • Type C
  • Type A + B
  • Type A + C
  • Type B + C
  • Type A + B + C
  • Type None

Nest into Parent family and label Wall Combination 

 

selector.gif

 

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 6 of 6

ToanDN
Consultant
Consultant

@JacobDSimpson 

Using a label (Family Type parameter) to get a dropdown list as @RDAOU demonstrated above is also my favorite approach when dealing with multiple choices.

0 Likes