Idle Event In Autodesk Inventor

Idle Event In Autodesk Inventor

Anonymous
Not applicable
1,214 Views
10 Replies
Message 1 of 11

Idle Event In Autodesk Inventor

Anonymous
Not applicable

Hi,

 

Do we have Inventor Idle Event. If not how can we implement the same for COM operations

 

0 Likes
1,215 Views
10 Replies
Replies (10)
Message 2 of 11

CCarreiras
Mentor
Mentor

What's That?

CCarreiras

EESignature

0 Likes
Message 3 of 11

Anonymous
Not applicable

Hi Carlos,

This is a separate event where the the Application lets the user know that the Application is currently in idle state and user can perform any operation on the background. Usually used by programmers to perform some kind of Asynchronous operations.

Such events are available in most of the CAD tools. Even Autodesk products like AutoCAD, Revit, etc has such events.

0 Likes
Message 4 of 11

CCarreiras
Mentor
Mentor

Thank you.

 

I have no idea.

CCarreiras

EESignature

0 Likes
Message 5 of 11

ekinsb
Alumni
Alumni

Inventor does not currently support an idle event. 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 6 of 11

Anonymous
Not applicable
Hi Brian,

Can i know if Inventor is busy or any dialog box is open for user input, etc...
0 Likes
Message 7 of 11

philippe.leefsma
Alumni
Alumni

You may try UserInputEvents.OnActivateCommand / OnTerminateCommand, so you will know if a command is running or not ...

 

This might not cover 100% of the secnarii but that should help.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 8 of 11

Anonymous
Not applicable

Hi Philippe,

 

I did try out your suggested method, method this doesn't work with dialogs like Open, Save as those doesn't have any commands.

 

Any other suggestion or options i can try.....!

 

0 Likes
Message 9 of 11

philippe.leefsma
Alumni
Alumni

I don't think there is an easy solution using the Inventor API itself, maybe you can use a lower level API in Win32 or .Net, checking idle event or the message loop...

 

Another suggestion would be to use the approach exposed in that blog post which replace Inventor native commands by custom ones, so you can get notifications when user is invoking them, but you have to do that for every command 😞

 

http://adndevblog.typepad.com/manufacturing/2012/07/replacing.html

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 10 of 11

Anonymous
Not applicable
Hi Philippe,

i have already used WIN32 API using message loop to check the idle state. I have come across one more hurdle that is "if a dialog is Open in Inventor, and waiting for Input from user" even then i get the idle state as true.

But unless the dialog is provided with user action other API calls fails.

One method is to check again using Win32 API using the parent window handle and check if there are any child window open.
This is my current option.

Any other suggestion..
0 Likes
Message 11 of 11

cadull_rb
Advocate
Advocate

I use ButtonDefinition.Execute2(false) to allocate my code a position in the execution queue. It could be worth testing how this behaves when a dialog is open.

 

Regards,

cadull

0 Likes