Forums
Forums >> Revit Building >> Technical Support >> if(not(and
|
|
active
Joined: Thu, Nov 13, 2008
148 Posts
|
I need an example for if(not(and conditional statment, Nested GV is the checkbox, GW is the dimension parameter
this does not work: if(not(and(G1V, G2V), (G1W - G2W), (G1W + G2W)))
and I am playing with this: If a checkbox is not checked I need to do somethng.
if(and(G1V, G2V, G3V), (G1W + G2W + G3W), if(and(G1V, G2V), (G1W + G2W), if(and(G1V, G3V), (G1W + G3W), if(and(G1V, G4V), (G1W), (G1W)))))
Thanks
-----------------------------------
Quote by: Holtz, Lou
|
This user is offline |
|
|
|
active
Joined: Mon, Aug 6, 2012
0 Posts
|
wouldn't the formula start: if(and(not(G1V),not(G2V)),...
|
This user is offline |
|
|
active
Joined: Thu, Nov 13, 2008
148 Posts
|
Hi Bartholomew, I have seen and example using "or" that looks the same as the example you show, but where is your second "and" parameter, I only see one.
I finaly got mine working but mine does not meet your example on the NOT part and this may be suspect to why it was querky. but it does what I want so I am now content.
if(and(G1V, G2V, G3V), (G1W + G2W + G3W), if(and(G2V, G3V, G4V), (G1W + G2W + G3W),if(and(G1V, G2V), (G1W + G2W), if(and(G1V, G3V), (G1W + G3W), if(and(G1V, G4V), (G1W), if(and(G2V, G4V), (G1W + G2W),if(and(G3V, G4V), (G1W + G3W), if(not(G1V),(G1W + G2W + G3W),(G1W)))))))))
Any techniques to shortent this?
-----------------------------------
Quote by: Holtz, Lou
|
This user is offline |
|
|
active
Joined: Mon, Aug 6, 2012
0 Posts
|
You're talking about a different conditions to evaluate. I provided the correct way to write an "if(and" evaluation.
An "if(and" returns "true" if both statements are true.
An "if(or" returns "true" if only one condition is true; not both.
There is no "if(not" the way you were using it. G1V is either ON (G1V) or OFF (not(G1V)). G2V is either ON (G2V) or OFF (not(G2V)).
Therefore: if(and(not(G1V), not(G2V), "true", "false"). Both G1V and G2V must be OFF to return "true".
if(or(not(G1V), not(G2V), "true", "false"). Either G1V or G2V must be OFF to return "true".
edit: I'm curiouis: "if(and(G1V, G2V, G3V), "true", "false")...Does this formula really work for you? How are are able to have 3 conditions to evaluate?
Edited on: Wed, Aug 3, 2016 at 7:20:19 PM
Edited on: Wed, Aug 3, 2016 at 8:03:25 PM
|
This user is offline |
|
|
active
Joined: Mon, Aug 6, 2012
0 Posts
|
cadman: very cool. Just got back to test. 3 Y/N conditions were indeed evaluated. Learn something new everyday. Thanks for sharing. Cheers!
|
This user is offline |
|
|
active
Joined: Thu, Nov 13, 2008
148 Posts
|
I removed my NOT and it still works as I need. this is a 4 visibility parameter formula, I am working my way to 6.
Take a look at the family, load it into a new file and hide 5 & 6 because they are not functional yet, You can change the size of the box and each piece will move accordingly and turn on and off as specified. the size is a type parameter the visibility is an instant parameter. in the new file, go to 3D so you can see the numbers on each box, apply shade for color, let me know what you think and if you know of a way to simplify the formulas, please share.
Thanks
Edited on: Thu, Aug 4, 2016 at 7:10:53 AM
-----------------------------------
Quote by: Holtz, Lou
|
This user is offline |
|
|
|
|
Site Stats
Members: | 2066382 | Objects: | 23085 | Forum Posts: | 152257 | Job Listings: | 3 |
|