Multiple visibility option

Multiple visibility option

C.Benke
Contributor Contributor
535 Views
8 Replies
Message 1 of 9

Multiple visibility option

C.Benke
Contributor
Contributor

Hi all,

 

I am trying to figure out whether if it's possible to assign 2 formula to 1 parameter. What I' trying to achieve is to have an option to turn off all the "Rivet hole" if I tick "Rivetcentre" but also keep the formula "Panel Length > 3850" at the same time.  Is there a way to do that?

Screenshot 2022-04-04 134223.png

0 Likes
Accepted solutions (2)
536 Views
8 Replies
Replies (8)
Message 2 of 9

EATREVITPOOPCAD
Collaborator
Collaborator

I am not sure what you are trying to achieve exactly but my guess is you need to use an IF statement with some ANDs and/or ORs

 

https://knowledge.autodesk.com/support/revit/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Revit-M...

 

Syntax for Conditional Statements
A conditional statement uses this structure: IF (<condition>, <result-if-true>, <result-if-false>)

This means that the values entered for the parameter depend on whether the condition is satisfied (true) or not satisfied (false). If the condition is true, the software returns the true value. If the condition is false, it returns the false value.

Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters. You can use the following comparisons in a condition: <, >, =. You can also use Boolean operators with a conditional statement: AND, OR, NOT. Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b).

The following are sample formulas that use conditional statements.

Simple IF: =IF (Length < 3000mm, 200mm, 300mm)

IF with a text parameter: =IF (Length > 35', “String1”, “String2”)

IF with logical AND: =IF ( AND (x = 1 , y = 2), 8 , 3 )

IF with logical OR: =IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )

Embedded IF statements: =IF ( Length < 35' , 2' 6" , IF ( Length < 45' , 3' , IF ( Length < 55' , 5' , 8' ) ) )

IF with Yes/No condition: =Length > 40 (Note that both the condition and the results are implied.)

 

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Message 3 of 9

C.Benke
Contributor
Contributor
I am trying to combine the 1st and the last formula together (Panel Length > 3850mm or not(Rivetcentre)) but it doesn't work. Any idea what would be the correct formula?
0 Likes
Message 4 of 9

EATREVITPOOPCAD
Collaborator
Collaborator

Still not enough information to figure out your true intent (for me at least lol)

 

do you want the Rivethole7VS parameter to be checked if Rivetcentre parameter is checked AND Panel Length parameter is greater than 3850 ? if so here is the formula

 

IF ( AND (Rivetcentre = true, Panel Length > 3850), On, Off)

 

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Message 5 of 9

EATREVITPOOPCAD
Collaborator
Collaborator

I would just double check the On / Off, it may be called true or false, or yes and no.... not sure to be honest but you get the idea

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Message 6 of 9

EATREVITPOOPCAD
Collaborator
Collaborator
Accepted solution

Ok so I tested to see if its yes / no or true / false or On / Off and etc... and apparently it's neither which is silly to me. I am sorry I didn't expect it. 

 

Here is what the actual formula would be

 

 

IF ( AND (Rivetcentre, Panel Length > 3850), 1=1, 1=2)

 

 

If you read about if statements first part is a condition, the second part is if it's true, and the third part if it's false. 

 

now 1=1 is true so if Rivetcentre is checked and Panel Length is over 3850 the statement will say 1 = 1 which is a true statement so the result is checkbox

 

and 1=2 is not a true statement so the checkbox will not be checked

 

Sorry for confusion

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Message 7 of 9

C.Benke
Contributor
Contributor
This one worked as intended. Thank you very much for your help!
Message 8 of 9

ToanDN
Consultant
Consultant
Accepted solution

As simpler formula:

= and ( Rivetcentre, Panel Length > 3850)

 

ToanDN_0-1649088592213.png

 

ToanDN_1-1649088607092.png

 

 

Message 9 of 9

C.Benke
Contributor
Contributor

It's working now.

0 Likes