PDA

View Full Version : True/False value



Ning Zhou
2009-10-30, 02:03 PM
don't know if there's constant boolean parameter which can be used in conditional statements in formula, like T or 1 for True value, F or 0 for False value, otherwise, i have to use something like 1 < 2 to denote True value, 1 > 2 to denote False value, well, sometimes for complicated conditional statements, you need to exhaust all conditions in which some of them are always True.
thanks.

patricks
2009-10-30, 02:28 PM
For a yes/no parameter, if you want something like "if A greater than B, then C will be yes, otherwise it will be no", then all you need to do is type "not(A<B)" for your C yes/no parameter formula.

So if A greater than B, C will be checked. If it's less than B then it will not be checked.

Can you go into more detail about what you're trying to do?

Ning Zhou
2009-10-30, 03:06 PM
thanks Patrick.
well, it's more like Switch / Case statements in programming language terms, like

switch (L)
{
case 100:
true;
break
case 200:
false;
break;
case 300:
false;
break;
default:
true;
break;
}

Ning Zhou
2009-10-30, 03:25 PM
to be more specific, i created a boolean parameter valid to check if the opening is valid for the following condition:
when one dimension is less than 350mm, the other dimension must be 350mm or greater

my formula as below, notice i have to use 1 < 2 to denote True for all other cases which i don't feel comfortable w/ it:
valid = if(Width < 1' 1 25/32", Height > 1' 1 25/32", if(Height < 1' 1 25/32", Width > 1' 1 25/32"), 1 < 2)

Ning Zhou
2009-10-30, 03:28 PM
oops, typing error, should be like below:

valid = if(Width < 1' 1 25/32", Height > 1' 1 25/32", if(Height < 1' 1 25/32", Width < 1' 1 25/32", 1 < 2))

patricks
2009-10-30, 05:30 PM
hmm I'm still not really following. I have no clue on that programming language stuff up there :p

Any chance you could share the family for us to look at? You could e-mail it to me if you don't want to share it with the world.

Ning Zhou
2009-10-30, 06:03 PM
i'll try to simplify my family and upload next week (way too complicated).

the idea is as simple as below:
1) the window size has a rule -> when one dimension is less than 350mm, the other dimension must be 350mm or greater
2) i created a boolean parameter which will control visibility of that window
. if meet that rule, then visible
. if not, then invisible

thanks

Munkholm
2009-10-31, 12:36 PM
Not really sure that I understand your need here, but have a look at the attached image, and see if it´s of any use :beer:

Munkholm
2009-10-31, 12:40 PM
and the family to play with...

Ning Zhou
2009-11-02, 11:38 PM
uploaded rvt for your reference, one is 300mm x 300m which is invalid -> invisible, another is 300mm x 400mm which is valid -> visible.

don't know if someone can get rid of that stupid 1 < 2 in the following formula.

if(Width < 1' 1 25/32", Height > 1' 1 25/32", if(Height < 1' 1 25/32", Width > 1' 1 25/32", 1 < 2))

thanks.