Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Autoupdate part attributes and expression linked to external excel files

Status
Not open for further replies.

UNIFORMSRL

Mechanical
Mar 19, 2009
21
Hi all,

We use NX6 + Moldwizard and we are installing a new ERP in our company.
I have built up a system which works more or less like these:

1) when parts are imported from moldwizard library, some attributes are defined for each of them using its excel system;

2) these attributes are imported into part expressions using KF command ug_askPartAttrValue();
e.g.: (string)EXP_CALL=ug_askPartAttrValue( "ATTR_CALL" ), where EXP_CALL is the expression name and ATTR_CALL the attribute name;

3) using the part expressions created, an excel file is queried in order to get an unique ERP part code;
e.g.: (string)ERP_CODE=ug_cell_vlookup( getenv("UGII_DATA_ERP")+ug_askPartAttrValue("EXCEL_NAME")+".xls", EXP_CALL, "a1:b9000", 1, 0 )

It all works fine, a part from the fact that IT DOES NOT UPDATE! Unless:
1) I recursively enter the expression editor for each subpart of the assembly;
2) I use tool->update->update for external changes, once per each part I need to update, assuming it as work part first;

Is there a journal command or a macro or something similar, to make UG do this cumbersome update job on its own?
My assemblies are very big :(

Thank you so much!
 
Replies continue below

Recommended for you

Not that I'm aware of. Note that starting with NX 8.0 we have improved the Attirbute update behavior, at least with respect to sensing that something has changed in the part and that an update needs to be performed (editing an Attribute will behave more like editing an Expression does now). However, with respect to changes made in an external spreadsheet and then drive those changes into NX, that's exactly what the Tools -> Update -> Update for External Change function is there for. Editing an external spreadsheet is just that, an "External Change".

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.
 
Ok, I see....
So the fact is that the KF function "ug_askPartAttrValue()" is triggered everytime I enter the expression editor and get the correct data... But there is no way to trigger it automatically, right?

So, am I lost?
 
Yes, that's correct. As I alluded to before, starting with NX 8.0 we have replaced the Attribute/Expression KF routines with new built-in functions which fully integrate Attributes and Expressions. Note that any legacy files (pre-NX 8.0) using these now-obsolete KF routines will continue to work in NX 8.0 as they did before, including retaining their old, less then ideal update behavior.

And while we have resolved most of the outstanding update issues relative to internally linked Attributes/Expressions, this in no way changes the behavior with respect to EXTERNALLY linked expressions/attriutes. At the moment I'm not aware of any plans to change this behavior since many people feel that the user needs to retain full control over when these sorts of updates should take place or even if they should at all. We certainly need avoid the situation where someone makes a change to some external file which would the launch an unexpected update of NX part files. Now that being said, via the use of Teamcenter there may be more appropriate schemes available which might be able to provide some programmatic control of something like this, but out-of-the-box, NX does not automatically respond to external changes to linked expressions or attributes without the use of the 'Update for External Change' function.

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor