Using not(Parameter 1 OR Parameter2) formulas with yes/no parameters

Using not(Parameter 1 OR Parameter2) formulas with yes/no parameters

McKinleyBoots
Advocate Advocate
1,534 Views
6 Replies
Message 1 of 7

Using not(Parameter 1 OR Parameter2) formulas with yes/no parameters

McKinleyBoots
Advocate
Advocate

I'm currently trying to design a family with several sets of yes/no parameters to dictate whether certain items are visible in the family, however, i want to coordinate them with if:then parameters so that only one of the parameters is checked while the others are off, however, I can't seem to get it to work with more than a single if=then statement, i.e.: I can't get it to work if i plug in "not(Parameter1 OR Parameter2)". Am I simply not understanding how the conditional statements work in this case, or is it impossible to make "or" style conditional statements in Revit?

 

Much help appreciated. 

0 Likes
1,535 Views
6 Replies
Replies (6)
Message 2 of 7

ToanDN
Consultant
Consultant

NOT (OR (PARAM1, PARAM2))

0 Likes
Message 3 of 7

McKinleyBoots
Advocate
Advocate
I just tried that, but i'm getting an error code "Improper use of boolean expressions". for reference, this is what i input: "NOT (OR (TC, TC+C))"
(TC & TC+C) are the two parameters that i want the yes/no parameter to not work with
0 Likes
Message 4 of 7

ToanDN
Consultant
Consultant

@McKinleyBoots wrote:
I just tried that, but i'm getting an error code "Improper use of boolean expressions". for reference, this is what i input: "NOT (OR (TC, TC+C))"
(TC & TC+C) are the two parameters that i want the yes/no parameter to not work with

NOT (OR (TC, [TC+C]))

 

Try not using any booleen symbol (+ - * /) in your parameter name. If you must use them then you need to add [...] to frame them in the formula.

0 Likes
Message 5 of 7

McKinleyBoots
Advocate
Advocate
Well, that worked to solve the boolean error code, and that one parameter is now working, however, when i try plugging that logic into the other parameters, it comes back saying that there is a circular chain of references among the formulas. for instance, this is what I'm trying to get my parameters to look like:
1 = not(or(2, 3))
2 = not(or(1, 3))
3 = not(or(2, 1))
0 Likes
Message 6 of 7

ToanDN
Consultant
Consultant

@McKinleyBoots wrote:
Well, that worked to solve the boolean error code, and that one parameter is now working, however, when i try plugging that logic into the other parameters, it comes back saying that there is a circular chain of references among the formulas. for instance, this is what I'm trying to get my parameters to look like:
1 = not(or(2, 3))
2 = not(or(1, 3))
3 = not(or(2, 1))

You cannot have a circular chain of reference like that.  Use Integer parameters to drive the Yes/No parameters instead of what you are doing.

 

Integer Param

1 = (Integer Param = 1)

2 = (Integer Param = 2)

3 = (Integer Param = 3)

Message 7 of 7

RLY_15
Advisor
Advisor

Toan's method is scalable to an arbitrary number of parameters while being pretty intuitive to read, so you won't have to worry about users trying to modify logic chains if they ever wind up adding more elements constrained to the same visibility set. This logic's also usable for all sorts of family types, we use these to manage pipe/duct tag variations based on what information we want a particular sheet to display.

0 Likes