# Thread: Inconsistent Units in Yes/No Parameter if/and Statement

1.  ## Inconsistent Units in Yes/No Parameter if/and Statement

So I have what should be a simple if/and conditional statement that I'm using to drive a Yes/No parameter in my L-shaped countertop family. The family contains instance parameters to control an angled corner, and rounded edges.

My statement is as follows: = if (and (corner angle, left radius), 1, 0)

where "corner angle" and "left radius" are both instance yes/no parameters.

However Revit rewards me with the dreaded "inconsistent units" error. Can anyone explain why this might be happening?   Reply With Quote

2.  This might help.  Reply With Quote

3.  Revit doesn't accept 1 or 0 as a value for a yes/no parameter.

You could write the formula like this instead:

In plain english the formula reads, "This parameter is not checked only when corner angle AND left radius are."

In contrast:

In plain english the formula reads, "This parameter is checked only when corner angle AND left radius are."  Reply With Quote

4.   Originally Posted by Steve_Stafford Revit doesn't accept 1 or 0 as a value for a yes/no parameter.
But it accepts 1=1 and 1=2 (or their equivalents) for Yes and No respectively.  Reply With Quote

5.  What Greg is suggesting is that you can keep your formula but written like this instead:

if (and (corner angle, left radius), 1=1, 1=2)

Instead of just using 1 or 0, providing a switch value, let Revit evaluate the true/false result as a math problem to solve. 1 is equal to 1, that's true. 1 is not equal to 2, that's false. Make sense?  Reply With Quote

6.  Excellent. I tried both solutions and they both work as you have described. I like the simplicity of the "and(left radius, corner angle)" formula, but it's nice to know that I wasn't too far off track with my original concept.

Thanks for the help.  Reply With Quote

7.    Reply With Quote

8.  I see 2 errors; replace 1, and 0 with 1=1, and 1=2 (assuming you meant for 1 to equal true/on and 0 to equal false/off), and remove "Void_L ="

Sent from my iPhone using Tapatalk  Reply With Quote

9.  I did not know you could use 1=1 and 1=2. I have always done 1<2 and 1>2. Same difference i guess.

Thanks for the info guys,  Reply With Quote

10.   Originally Posted by GMcDowellJr I see 2 errors; replace 1, and 0 with 1=1, and 1=2 (assuming you meant for 1 to equal true/on and 0 to equal false/off), and remove "Void_L ="

Sent from my iPhone using Tapatalk  hi Greg,

I end up created another parameter by tying Void=L another ref. plane in order for "Void=L" to function with length

1) Void Extrusion don't have a visibility on/off check box

I tried IF ( AND (x = 1 , y = 2), <true>, <false>)
Returns <true> if both x=1 and y=2, else <false>

but still not able to make it ... can show how to write the 1=1 and 1=2 formula ?

thankss  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•