Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations Ron247 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to have "variable" expression names based on an expression or part attribut

Status
Not open for further replies.

LukeS

Aerospace
May 19, 2016
2

Hi,

I'm new to posting on here but have been a frequent visitor over the last 8 years, often getting my questions answered just by reading other posts, massive thanks for that!

however I haven't found an answer to my question this time round so here I am!

I'm using NX9 and I would like to be able to have expression names that reference either a value of another expression or an attribute from the part giving me variable expression names.

i.e.
EXP_1_"Hole_number" = 5
Hole_number = 1 (or any number)

In an ideal world this would give me an expression with a name of EXP_1_1 with a value of 5

Is this at all possible?? I've had a look around and I'm getting nowhere with it.

Thanks in advance
Luke
 
Replies continue below

Recommended for you

Luke --

In a word, no. :)

But can you explain what you're trying to do with that? Why the need for a variable name?

I suspect we can think up a different way to accomplish what you're trying to do if we understand it better.

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
I would look at the 'List' Expression function and the 'nth' function. You might be able to make that do what you want.

John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:

The secret of life is not finding someone to live with
It's finding someone you can't live without
 
Thanks for the responses!

I had a feeling the answer might be no, but I thought id ask!

The reason for wanting to do this is somewhat unconventional! I have a UDF that I have created and within the UDF are several expressions some measured and some defined as user inputs that control the UDF. (I’m currently pulling around 20 expressions out of each UDF)

These are all read though into the master part when inserting the UDF, However the UDF is inserted anywhere between 10 and 60 times within a part and has a specific order i.e. hole 1 thru 60. This gives me a very large amount of expressions in the master part with essentially the same name, with the exception of each now ending with the feature operation number of the UDF that it belongs to.

This is where my issue is, currently I extract all these expressions and sort them in a macro enabled spread sheet into their respective expression names and order them (hole 1 through 60 for example) using the feature number. This works initially but it does mean that the UDF’s have to be inserted in the order that the data is required i.e. 1 thru 60, the real problem comes if I wish to edit anything in the part after the UDF’s have been inserted as when items/features are added into the model tree above the UDF’s or I wish to add say a hole between 10 and 11, the UDF’s feature number changes BUT the expression name that is linked to it retains the old feature number. This makes sorting the outputted values a very manual task and not something that can be easily automated especially when adding UDF’S between other existing ones.

My plan to fix this if the variable expression names were possible was to have an additional expression within the UDF defined as a user input that added an identifying number to each of the other expressions, but it seems this won’t be possible.

apologies for the long winded response if anything I have said needs clarifying or doesn't make sense just ask and I will try to explain it better

Any thoughts as to how I might achieve my end goal would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor