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: 

Using "and" with multiple Yes/No statements

7 ANTWORTEN 7
GELÖST
Antworten
Nachricht 1 von 8
Mark_Engwirda
775 Aufrufe, 7 Antworten

Using "and" with multiple Yes/No statements

Hi, I'm trying to write the correct syntax for the following yes/no statements so that the parameter Bars will provide the correct Yes/No result.

 

If Show Glazing Bars and Single Bank or Double Bank or Triple Bank are true , the parameter Bars" will also be true.

 

Screenshot 2023-05-16 102305.jpg

 

 

 

7 ANTWORTEN 7
Nachricht 2 von 8
ToanDN
als Antwort auf: Mark_Engwirda


 

 


or(and(Show Glazing Bars, Single Bank), and(Show Glazing Bars, Double Bank), and(Show Glazing Bars, Triple Bank))

 

Nachricht 3 von 8
Mark_Engwirda
als Antwort auf: Mark_Engwirda

Hi @ToanDN  thanks for the quick reply.

I tried using the or option using "or(Show Glazing Bars, Single Bank, Double Bank, Triple Bank)" but it doesn't provide the correct result.
I think it needs to be something like and(Show Glazing Bars or(Single Bank, Double Bank, or Triple Bank) but my knowledge of the correct syntax is wrong.   
Does this make sense of what I am trying to do?

 

Nachricht 4 von 8
ToanDN
als Antwort auf: Mark_Engwirda

look at the post again. i edited it.

Nachricht 5 von 8
Mark_Engwirda
als Antwort auf: Mark_Engwirda

.

Nachricht 6 von 8
Mark_Engwirda
als Antwort auf: ToanDN

Yep, that did it!
So grateful for your help


Nachricht 7 von 8
Alfredo_Medina
als Antwort auf: Mark_Engwirda

@Mark_Engwirda , @ToanDN 

 

I have a comment. This formula could be simplified like this: 

and(Show Glazing Bars, or(Single Bank, Double Bank, Triple Bank))

 

Only one AND and one OR.

OR and AND statements can have multiple parameters separated by commas. It's not necessary to do multiple OR or AND statements, each with two parameters.

 

 

2023-05-16_12-26-33.png 


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Nachricht 8 von 8
Mark_Engwirda
als Antwort auf: Alfredo_Medina

Thanks @Alfredo_Medina 

Yes that is a more simple, elegant way  of writing the formula, I do like it.
ToanDH did write his solution and got it back within minutes of my request for help so I am really impressed with both solutions.

 

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