Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Conditional formula for YES/NO parameter

11 ANTWORTEN 11
GELÖST
Antworten
Nachricht 1 von 12
luis_brionesalonso
3312 Aufrufe, 11 Antworten

Conditional formula for YES/NO parameter

Hi, 

I've been having an issue that I cannot resolve regarding conditional formulas for YES/NO parameter. 

 

I have three YES/NO parameters: A,B, and C. A is only YES when a certain condition is met, B is a simple Tick Box (YES/NO instance parameter). What I want to achieve is the following: 

If A=NO then C=NO, if A=YES then C=NOT(B)

or

If A=Yes then C=NO, if A=NO then C=NOT(B).

 

Does anybody know how you could possibly write a formula for C so that these conditions are met?

11 ANTWORTEN 11
Nachricht 2 von 12
Luiscko
als Antwort auf: luis_brionesalonso

I think the best way is create two parameters yes and no, one for AB and another for C, when you obtain your first result then you can apply one script to Dynamo pretty easydfs.PNG



Luis Rodríguez
BIM Structural | GEDCOM
GEDCOM Institute
YouTube |Facebook |Twitter | LinkedIn



Nachricht 3 von 12
luis_brionesalonso
als Antwort auf: Luiscko

I'm not sure I see how the Dynamo-script is applicable here. The parameters are meant to be used as visibility parameters in a detail family if it helps. The parameters have to remain seperate as well since the goal is to have parameter C=not(B) when A=YES and C=NO when A=NO.

 

A and B can vary independent from each other.

Nachricht 4 von 12
barthbradley
als Antwort auf: luis_brionesalonso


@luis_brionesalonso wrote:

Hi, 

I've been having an issue that I cannot resolve regarding conditional formulas for YES/NO parameter. 

 

I have three YES/NO parameters: A,B, and C. A is only YES when a certain condition is met, B is a simple Tick Box (YES/NO instance parameter). What I want to achieve is the following: 

If A=NO then C=NO, if A=YES then C=NOT(B)

or

If A=Yes then C=NO, if A=NO then C=NOT(B).

 

Does anybody know how you could possibly write a formula for C so that these conditions are met?


 

Huh??? Makes no sense. It reads like C is never on.  If A and B are checked, C is unchecked.  If A and B are unchecked, C is also unchecked. 

 

Maybe you mean this:

 

C=and(not(A), not(B))

 

 

 

 

 

 

 

Nachricht 5 von 12
luis_brionesalonso
als Antwort auf: barthbradley

As mentioned above, A and B are independent from each other. So there are four combinations, not two.

what I want to achieve:

If A=no then C=no, if A=yes then C=not(B)

 

So if A=yes and B=no then C=yes

If A=yes and B=yes then C=no

If A=no then C=no, whether B=yes or no

Hope this helps you understand.

 

 

Nachricht 6 von 12
barthbradley
als Antwort auf: luis_brionesalonso

Did you try the formula I gave you above?  

 

C=and(not(A),not(B))

Nachricht 7 von 12
chunton
als Antwort auf: luis_brionesalonso

Try this:

if(not(A), A, if(and(A, B), not(A), if(and(A, not(B)), A, B)))
Nachricht 8 von 12
FAIR59
als Antwort auf: luis_brionesalonso


@luis_brionesalonso wrote:

As mentioned above, A and B are independent from each other. So there are four combinations, not two.

what I want to achieve:

If A=no then C=no, if A=yes then C=not(B)

 

So in formula-language: IF(not(A),A,not(B))

Nachricht 9 von 12
luis_brionesalonso
als Antwort auf: barthbradley

I'll try it out tomorrow, although I suspect that formula won't work since it reads as giving a YES value when A and B are NO and a NO value when A and B are YES, which is not what I am looking for. I think the formulas given below are the correct solution to my problem. 

Nachricht 10 von 12
barthbradley
als Antwort auf: luis_brionesalonso

Yep. It doesn't work with the conditions you spelled out in your second post.  I just threw that one out based on what you wrote in your first post:  "C" is OFF when "A" is ON or OFF.   Understandably, a little confusing.   Actually, the correct formula for that one would be: "C"=1>2  Smiley (zwinkernd)

 

 

Nachricht 11 von 12
luis_brionesalonso
als Antwort auf: FAIR59

Works perfectly, thank you. Smiley (fröhlich)

Nachricht 12 von 12
luis_brionesalonso
als Antwort auf: barthbradley

It actually does work when you rewrite it to C=and(A, not(B)) since it should only be on when A is on and B is off in this case. Thank you for the suggestion.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report