Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

NX 8 ug_setAttrValue UPDATE ISSUES

Status
Not open for further replies.

superhiz

Automotive
Apr 16, 2012
2
0
0
US
NX 8.03.4r MP7 VERSION
We are experiencing issues with the ug_setAttrValue expression output. It has worked in previous version fine, but now any file opened up in nx8 seems to read to the end of the If else statement and output the end result of the statement, even though the statement is false.
e.g.

ug_setAttrValue_("", "PART_ATTRIBUTE", "DESCRIPTION", IF(TYPE==0)("GMSP (SEE DATA)")ELSE(IF(set_vendor==0)(dayton_callout)ELSE(IF(set_vendor==1)(lane_callout)ELSE if(set_vendor=2)(moeller_callout)else(" "))))

It can be fixed by simply updating one of the expression variables that drives the statement and it will update fine, problem is every time you close and open the file it reverts back to the end line result no matter true or not. Also can be updated by Tools> update> update for external change, but will not save correctly as well.

So is this a ug setting or a bug? I realize ug has created some more options using attributes at the assembly level and can select the options for component properties or assembly properties so I am wondering if this part of the problem.
 
 http://files.engineering.com/getfile.aspx?folder=97d83939-d360-4ed5-928d-8ff077aadd16&file=New_Metric_Button.prt
Replies continue below

Recommended for you

If you're running NX 8.0 I would recommend that you stop using the Attribute functions from the f(x) area and instead use the new direct Expression/Attribute exchange functions now available in the Attribute dialog and the Expression dialog.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
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.
Back
Top