Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Problem updating expresions and attributes.

Status
Not open for further replies.

FrankMalone

Mechanical
Jun 20, 2003
76
Hi all,

When I change an expression in the top part. The attributes made with ug_setPartAttrValue are well updated, but the attributes in the child part made with ug_setPartAttrValue with an expression linked to the top part are not updated.

I need to enter one by one in the child components and open and close the expressions menu in order to have the attributes updated correctly.

Scenario:
1st part - top (with geometry) name="top_part"
2nd part - child under top (a screw) name "screw_part"

on top expressions:
------------------------
Vol=111111111
A=if (Vol<=120000000)(85) else if (Vol>=580000000)(145) else (105)
B=if (A=85) (40) else if (A=145) (70) else (50)
E=if (A=85) (12) else if (A=145) (22) else (16)
G=if (A=85) (10) else if (A=145) (24) else (16)
DIM=ug_setPartAttrValue( "DIMENSION", format("%.0fx",A) + format("%.0fx",B) + format("%.0f",E))

on 2nd part expressions:
----------------------------
mt="top_part"::G
Ltok=10
DIM=ug_setPartAttrValue( "DIMENSION", format("M%.0fx",mt) + format("%.0f",Ltok))

Now if I change the Vol expression in the top from 111111111 to 888888888 (nine ones or nine eights), the DIMENSION attribute in the child part (screw_part) is not updated (neither with the option update for a external change). As I said, I need to make work the child then open and close the expressions menu.

Do you know any way to make the update automatically?

Thanks.
Frank.
 
Replies continue below

Recommended for you

After making your Expression edit(s), go to...

Tools -> Update -> Update for External Change

...and your Attributes should update fine.

Note that this is a known issue with Attributes and is being addressed in the next release of NX, but until then, this is the cleanest way to force a complete update of Attributes in your session. If you need to do this often, I would recommend that you use Customize to add an icon to one of your toolbars which will perform the 'Update for External Change' operation (that's what I've done) until this is resolved.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Hi John, thanks, I have tried update for external change, but does not work. I need to make work part the child then open and close the expressions menu.

Could be the same issue you are pointed, but it's dangerous, because that attribute goes to BOM.

Thanks
Frank.
 
Hi, I´m having a similar problem and I would like to know if you can help me!...

I´m working whit knowledge Fusion

in the first part I have 2 KF attributes (attribute1 and attribute2)

I use attribute1 for catch a value from the user.

In the attribute2 I use the function ug_SetExpressionValue_ becausse I want to set the value of attribute1 in a expression located in a diferent part file.

I can set the value of attribute1 in the expression located in the second part file but when I change the value of attribute1 the expression never updates in the second part file.

Any help is appreciated!

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor