×
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

Autoupdate part attributes and expression linked to external excel files

Autoupdate part attributes and expression linked to external excel files

Autoupdate part attributes and expression linked to external excel files

(OP)
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!

RE: Autoupdate part attributes and expression linked to external excel files

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.

RE: Autoupdate part attributes and expression linked to external excel files

(OP)
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?

RE: Autoupdate part attributes and expression linked to external excel files

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.

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