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