Reply

Model not updating

[ Edited ]

I have code that changes dimensions in an assembly. I can see in the Variables table that the dimensions do in fact get changed and that the variables are linked properly to the components. I try to update the model with:

 

objDoc.ActivateAll()

objDoc.UpdateAll()

 

The model does not update. (This works on other programs I have written.)

 

When I close the program and the model and open the model, it updates.

 

What is preventing the model from updating immediately like in other programs?

 

Thanks

Terry

 

 

Posted by: Terry Tyson
Post date: 4/11/2011 5:43:14 AM

2 REPLIES

RE: Model not updating

[ Edited ]

I found that I have another program that has this problem.

 

The assembly has 3 parts. One of the parts updates immediately, the other two do not update until the model is closed and re-opened.

 

I can not find any difference in the models or the code that would cause this.

 

Please help.

 

Posted by: Terry Tyson
Post date: 4/11/2011 6:23:14 AM

RE: Model not updating

[ Edited ]

The problem is in the variable Type, i.e. "Dim" vs "Var"

 

If you have a value you want to update immediately and it is a "Dim"

 

Dim     LENGTH     40.000 in

 

1) Create a "Var" to receive the variable link.

 

Var     POST_HEIGHT     40.000 in

 

2) Set the formula for the "Dim" to be equal to the "Var"

 

Dim     LENGTH     40.000 in     POST_HEIGHT

 

3) Now, when your program creates a link to the "Var"

 

Var     POST_HEIGHT     40.000 in     @'C:\Users\ttyson\Desktop\Automation Test\SECTION_A\Int_Posts\IPA-24-0.asm'!'137'

 

4) and then you use:

 

objDoc.UpdateAll()

 

The model will update and the user can immediately see the results of the changes.

 

 

Posted by: Terry Tyson
Post date: 4/11/2011 9:45:23 AM