Checkbox conditional statement

Checkbox conditional statement

Anonymous
Not applicable
9,197 Views
7 Replies
Message 1 of 8

Checkbox conditional statement

Anonymous
Not applicable

So, im trying to make check boxes affect other check boxes. Im rubbish at programming, but I decided to take a shot at it

 

 

Working With 3 check boxes, key plan A, key plan B and key plan I tried to write out.

 

=IF(OR(KEY PLAN A ,KEY PLAN B)=Yes, Yes,No)

 

Does revit not recognize yes/no as the outcomes of a yes/no checkbox? Is there a way to check and uncheck a box like this?

 

The overall outcome I want is if KEY PLAN A or KEY PLAN B are checked, to also check KEY PLAN

 

Key plan.JPG

0 Likes
Accepted solutions (1)
9,198 Views
7 Replies
Replies (7)
Message 2 of 8

SteveKStafford
Mentor
Mentor

This thread at RFO is an excellent resource, a great deal of formulaic solutions are stored there. Go to the very first post in the thread for a long summary of different formula techniques. The rest of the thread is a run-on series of questions and answers.

 

The counter-intuitive part of Yes/No formula syntax is that it assumes a true result. Turning off one Yes/No parameter based on another would look like this:

 

Parameter: CheckA - its formula is: Not(CheckB)

Parameter: CheckB

 

If user clicks CheckB (a yes) then CheckA turns off automatically. If CheckB is not checked then Check A is checked automatically. The user only has to interact with CheckB.

 

Dealing with more than two Yes/No parameters and evaluating them is more complicated and there are a few IF conditional approaches in the thread I linked to above.


Steve Stafford
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
EESignature

0 Likes
Message 3 of 8

L.Maas
Mentor
Mentor
Accepted solution

In your case a simple OR will do. OR(A, B)

OR.png

 

This also goes to true if if both A and B are true. You would have to change the formula if you do not want C to be true if that is the case.

 

OR2.png

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Message 4 of 8

rachelthornton1973
Explorer
Explorer

How would you go about having 4 checkbox where only one of them can be picked, automatically turning off the others?

0 Likes
Message 5 of 8

ToanDN
Consultant
Consultant

You can use an integer parameter input to control the checkboxes. Enter the formula for checkbox 1: integer input = 1.  Similar for the other 3.

0 Likes
Message 6 of 8

rachelthornton1973
Explorer
Explorer

Hi and thanks for the reply, doesn't that just completely negate the idea of them selecting one of the 3 the checkboxes? just replaces that with "Pick a number"? but they have no way of knowing what the number relates to?

 

With checkboxes i can name them anything descriptive:

 

 - Option A

☒ - Option B

☒ - Option C

 - White Finish

☒ - Terracotta Finish

☒ - Beige Finish

etc etc.

From all the reading I've done, Revit pretty much only lets you check two checkboxes against each other? why after 10 yrs or more are the most basic functionalities not included in this software? drives me nuts 😞

Was hoping there was some way of doing it but seems may people have struggled to get this to work, so guessing im joining them in the "Maybe one day it will come" crowd :S

 

0 Likes
Message 7 of 8

Jboone4HV2J
Enthusiast
Enthusiast

There is one more method for selecting one of many conditions, as many as you like.  In this case, I want the disconnect handle on this family to disappear and to size the box as required for many conditions, and I could add many more to it.

In this case I made three and I hope this gives users a good start to do what you want.

 

0 Likes
Message 8 of 8

Jboone4HV2J
Enthusiast
Enthusiast

Getting a larger view of finished family we have something that looks like this.

I only used this so I can put connectors on a box that I can slap on a model and connect conduits to it.  Someone else designed the electrical and I finish the model off with more detailed electrical items.  This is just one of many tricks.

0 Likes