Problem updating expresions and attributes.
Problem updating expresions and attributes.
(OP)
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.
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.





RE: Problem updating expresions and attributes.
NX 7.5.0.32 MP1
Frank.
RE: Problem updating expresions and attributes.
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
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Problem updating expresions and attributes.
Could be the same issue you are pointed, but it's dangerous, because that attribute goes to BOM.
Thanks
Frank.
RE: Problem updating expresions and attributes.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Problem updating expresions and attributes.
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