Slow performance of code execution

Slow performance of code execution

patrick_deschenes
Contributor Contributor
329 Views
2 Replies
Message 1 of 3

Slow performance of code execution

patrick_deschenes
Contributor
Contributor
Hi,

I made a VB program that modelize our product. Inventor 2008 is executing the my code very slowly. I noticed a workaround that need human interference. That workaround is to RMB and put the mouse over the context menu; it speed-up the process by two times.

Why is this behave like that? Is it because the mouse do not interact with Inventor 2008 anymore? If it is the case, is it possible to achieve that by programming?

Thank you very much for your help.
0 Likes
330 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
It seems like you have an out of process application interacting with
Inventor. If so, use the UserInterfaceManager.UserInteractionDisabled
property (set it to True) when making API calls. If there is no user
interaction required, you could leave this property set for an entire block
of code. This would provide the performance improvement equivalent of
pulling down a context menu or any menu item in Inventor.

Sanjay-

wrote in message news:5786692@discussion.autodesk.com...
Hi,

I made a VB program that modelize our product. Inventor 2008 is executing
the my code very slowly. I noticed a workaround that need human
interference. That workaround is to RMB and put the mouse over the context
menu; it speed-up the process by two times.

Why is this behave like that? Is it because the mouse do not interact with
Inventor 2008 anymore? If it is the case, is it possible to achieve that by
programming?

Thank you very much for your help.
0 Likes
Message 3 of 3

Anonymous
Not applicable
you could also try Application.SilentOperation = True before starting your code and then Application.SilentOperation = False after the code is finished.

Although, you'll want to make sure your code works well and traps all errors, otherwise it may exit without turning SilentOperation to false and you won't be able to interact with the program.
0 Likes