×
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

expression format

expression format

expression format

(OP)
Looking for a way to achieve the following:

I have an expression where the user inputs a number between 1 and 10:
wzp=3

I also have 10 expressions defined as: wzp_out[1-10]= ###

Now I want to call out a wzp_out variable based on the value of wzp:

wzp_out[value of wzp] = wzp_out3

So the result in my formula line would be interpreted as wzp_out3 thereby calling the value of wzp_out3 in my formula.

I thought i had seen something like (wzp_out[wz]) and the system interprets it as wzp_out3. Anything I try is giving me errors. Anyone have the proper format for this?

Thanks in advance.

RE: expression format

What version of NX are you running?

Starting with NX 8.0, we implemented a new expression type called a 'List' expression which can be used to do exactly what you have in mind.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: expression format

Assuming that you're running either NX 8.0 or NX 8.5, I've created a very simple example file showing how you can make all this work. Open the attached file, but don't go the Expression dialog right-away. Rather, go to...

File -> Properties...

...where you will find two Attributes, 'wzp' and 'wzp_out'. The attribute, 'wzp' can be set to any integer value between 1 and 10. The attribute 'wzp_out' represents that list of 10 expression values that you want the system to return based on which value you choose for 'wzp'. Anyway, select the 'wzp' attribute and in the value field you'll see that you can select any value between 1 and 10. Select whatever value you desires and then hit the 'Appy' button and you'll notice that the 'wzp_out' attribute will update. Also notice that the PMI note on the screen will also update since it's linked to the values of the expressions which are linked to the attributes.

OK, now you can open the expression dialog and with the filter set to 'All' you can review the expressions and you should get an idea how this all works.

Anyway, I hope this helps you with what you're looking for.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: expression format

(OP)
Got it John...I think this will work perfect for me. Great solution.

Thanks so much!

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