Is it possible to disable the sketch update?

Is it possible to disable the sketch update?

stefanome
Collaborator Collaborator
1,350 Views
3 Replies
Message 1 of 4

Is it possible to disable the sketch update?

stefanome
Collaborator
Collaborator

I have a function that adds many entities and constraints to a sketch, and it's very slow because it updates the sketch after each constraint is created.

Is it possible to turn off the automatic update, add all the entities and constraints, then turn on the update?

 

Thanks,

Stefano

0 Likes
Accepted solutions (1)
1,351 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Accepted solution

Use Sketch.DeferUpdates property

See also the sample "DeferSketchUpdate" in the Inventor API Help

0 Likes
Message 3 of 4

stefanome
Collaborator
Collaborator

Thanks,

That's what I was looking for.

Unfortunately reduces the time from 2.9 to 2.3 seconds only, I was hoping on a bigger difference.

0 Likes
Message 4 of 4

Anonymous
Not applicable

You may also try user interaction disabling

oApp.UserInterfaceManager.UserInteractionDisabled = True
... Place your code here ...
oApp.UserInterfaceManager.UserInteractionDisabled = False

 

This usually works in the out-of-process applications.

Be careful with possible errors because end user can do nothing in Inventor when this interaction is disabled 

 

 

 

0 Likes