Details
The "if-else" Function in Expressions may fail with mis-matched units.
Solution
The issue is in the conversion and the check with the base part units. If
there are no units on the "1" value in the expression editor, then it will
convert and check it as if it is 1 [inch or mm, depending on the part units].
So the easy solution is to make the 1 check using the same units as your
expression "use_me".
For example:
All of these produce "false".
use_me = 1 in
check = if ( use_me= 1[in] ) "false" else "true"
use_me = 1 Angstrom
check = if ( use_me= 1[angstrom] ) "false" else "true"
use_me = 1 mm
check = if ( use_me= 1[mm] ) "false" else "true"
{Notice that even if this is in an inch part, if checked using the matching
units, it works.)
use_me= 0.001 m
check = if ( use_me= 1[mm] ) "false" else "true"
Notes and References
Hardware/Software Configuration
Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: DESIGN
Version: V11.0.2
Function: EXPRESSION
Ref: 001-9119644