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