×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

NX "Expressions" Syntax

NX "Expressions" Syntax

RE: NX "Expressions" Syntax

It looks like there is an ELSE missing

NX 9.0.3.4
NX 10 (Testing)
Windows 7 64 (Windows 8.1 Tablet)

RE: NX "Expressions" Syntax

Can you post the actual text of the formula (rather than a picture) and a detailed description of what you want it to do?

RE: NX "Expressions" Syntax

So, the main problem I see here is that you've written a perfectly valid formula... for Excel. smile

The easiest "conditional" syntax in NX expressions is:

if (a) then (b) else (c) 

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. smile

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:

round( target_number * 1e5 ) / 1e5 

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:

round( 0.86159^( 8 - if(FRAME>28) then(28) else( if(FRAME<2) then(2) else( floor( FRAME / 2 ) * 2 ) ) / 2 ) * 1e5 ) / 1e5 

[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. smile

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

(OP)
Thanks for the help, I solved the problem.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources