I'm new at boolean, not quite getting the AND statement to work

I'm new at boolean, not quite getting the AND statement to work

chris.stroudWUD5J
Contributor Contributor
409 Views
4 Replies
Message 1 of 5

I'm new at boolean, not quite getting the AND statement to work

chris.stroudWUD5J
Contributor
Contributor

So Heres what i'm trying:

 

IF <BLOCK VISIBILITY> IS ON/OFF, DO X. IF BOTH <BLOCK VISIBILITY> AND <CORE VISIBILITY> ARE OFF, DO Y

 

I can get the first part to work just fine, but i'm struggling with the underlined part, I've tried a bunch of ways and got a bunch of different errors, i'm just too new at this sort of thing to understand the correct syntax.

 

so here's what i'm trying:

 

syntax.PNG

the line in core name isn't important for the moment, that works

 

Does the second part need to be a new line? or am i completely off?

 

Thank you.

0 Likes
Accepted solutions (2)
410 Views
4 Replies
Replies (4)
Message 2 of 5

chris.stroudWUD5J
Contributor
Contributor
Accepted solution

Alright, i just figured it out.

 

Turns out the AND statement should have been the answer to the NO part of the first part:

 

if(BLOCK VISIBILITY, 38 mm, if(and(BLOCK VISIBILITY, CORE VISIBILITY), 38 mm, 4 mm))

 

🙂

0 Likes
Message 3 of 5

Ilic.Andrej
Advisor
Advisor
Accepted solution

I assume you want to do OR statement and you don't know that it exists. Yes, it exists.

 

if(or(block visibility,core visibility),x,y)

If any one of those is checked, do one thing. Otherwise, do another...



Andrej Ilić

phonetical: ændreɪ ilich
MSc Arch

Autodesk Expert Elite Alumni

0 Likes
Message 4 of 5

chris.stroudWUD5J
Contributor
Contributor

Hey thank you very much, that'll come in hand for the next thing I need to do 🙂

0 Likes
Message 5 of 5

bin
Advisor
Advisor

Maybe this?

if(and(not(BLOCK VISIBILITY),not(CORE VISIBILITY)),Y,X)

0 Likes