Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Idle Event In Autodesk Inventor

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
710 Views, 10 Replies

Idle Event In Autodesk Inventor

Hi,

 

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

 

Tags (3)
10 REPLIES 10
Message 2 of 11
CCarreiras
in reply to: Anonymous

What's That?

CCarreiras

EESignature

Message 3 of 11
Anonymous
in reply to: CCarreiras

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.

Message 4 of 11
CCarreiras
in reply to: Anonymous

Thank you.

 

I have no idea.

CCarreiras

EESignature

Message 5 of 11
ekinsb
in reply to: Anonymous

Inventor does not currently support an idle event. 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 6 of 11
Anonymous
in reply to: ekinsb

Hi Brian,

Can i know if Inventor is busy or any dialog box is open for user input, etc...
Message 7 of 11
philippe.leefsma
in reply to: Anonymous

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

Message 8 of 11
Anonymous
in reply to: philippe.leefsma

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

 

Message 9 of 11
philippe.leefsma
in reply to: Anonymous

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

Message 10 of 11
Anonymous
in reply to: philippe.leefsma

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..
Message 11 of 11
cadull_rb
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report