Create an expression with a formula containing a constant value fails with
Alert:
----------------------------------------------
The expression is invalid for update in NX.
Dimension mismatch (binary operation)
Attempt to use the "-" operation on a Length and a Angle.
Expression:
TANG_Length=tan(90-Angle_1)
TANG_Length: Dimension mismatch (binary operation)
----------------------------------------------![](/kbassets/PL8002690/9a6e062db072d319543bd2248b7dc8b35f6d9335ef25376b4a09ebd45a2b.jpg)
- When TANG_Length=tan(90-Angle_1) it has a Dimension mismatch
- When TANG_Length=tan(Angle_1) the expression is valid.
Why is "90" as value not matching?
Solution
The key to the answer is; how NX interpret the unit of a dimensionless value
at the Right Hand Side (RHS) of the expression. When the units of a value is
not specified on the Right Hand Side (RHS) then the system assumes that the
value is in the units of the Left Hand Side (LHS).
![](/kbassets/PL8002690/b7af74e15995dda0fdfe4b0c4b3a5239819ee0db969296754ade22e99971.jpg)
The unit of (LHS) TANG_Length= [mm]. When you use a constant at the (RHS),
then it assumes [mm]. That is why 90[mm] is not matching Angle_1 [degrees] in
this case.
You can solve this by explicitly add the units behind the constant-value (or
expression) to make the units match: 90[degrees] or 90degrees . The expression
will look like:
TANG_Length=tan(90[degrees]- Angle_1)
Other option is to use the new "REMove Unit" function (REMU) in NX 11. With
this function you can remove the unit [degrees] form Angle_1 in the formula.
The expression will look like:
TANG_Length=tan(90-remu(Angle_1))
![](/kbassets/PL8002690/c444bcef9218965f783a23dd035abb8ebdda83c7c80fb5374d8f74175f7e.jpg)
Notes and References
See other example in FAQ:
http://solutions.industrysoftware.automation.siemens.com/view.php?si=001-1942214
Hardware/Software Configuration
Platform: INTL64
OS: window
OS Version: 764SP1
Product: NX
Application: DESIGN
Version: V11.0
Function: EXPRESSION
Ref: 001-8994948