NX "Expressions" Syntax
NX "Expressions" Syntax
(OP)
Can someone help me out here with the syntax. What am I missing?
Please see attachment:
Please see attachment:
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: NX "Expressions" Syntax
NX 9.0.3.4
NX 10 (Testing)
Windows 7 64 (Windows 8.1 Tablet)
RE: NX "Expressions" Syntax
RE: NX "Expressions" Syntax
The easiest "conditional" syntax in NX expressions is:
It looks like you're trying to use the Excel IF(a,b,c) syntax for your conditional here, and that's just not going to work.
Similarly, the INT() function is an Excel function but not an NX function. The NX equivalent (to round a number down to the nearest integer) is floor().
The ROUND() function also works a little differently. The NX function just rounds to the nearest integer, and doesn't have the argument for five decimal places like you've used here, so we'll need to nudge it a bit to move your answer out to the fifth decimal where you want it:
In other words, multiply the target number by 10^(the desired precision), round the big number, and then divide back to the order of magnitude you want. Make sense?
So, if I've interpreted it correctly, your final formula should look more like:
[I've obviously got some spaces in here, just for readability... You can include or not include those... The NX expressions engine will just ignore the whitespace in the end.]
...which generates a really nice scaling factor (of 0.35246 and 2.44453) for FRAME sizes between 2 and 28 and catches bad input outside the 2-28 range for FRAME.
Slick. That's a nice formula.
Does that help?
Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
RE: NX "Expressions" Syntax