Check Inventor is idle

Check Inventor is idle

DWhiteley
Advisor Advisor
844 Views
3 Replies
Message 1 of 4

Check Inventor is idle

DWhiteley
Advisor
Advisor

I need to check that Inventor is "idle" (doing nothing), so that I can run an external programme on it.

 

I have used:

 

strSBText = OApp.StatusBarText

If strSBText = "Ready" Or strSBText = "For Help, press F1" Then....

 

However, this does not work if "Dynamic prompts" is switched on.

 

Now, I remember some time back, being told of another way, but I can't remember the solution!

 

Can anyone prompt my mwemory on this?

 

Thanks in advance,

 

Dave

 

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

DWhiteley
Advisor
Advisor

Just to add to this, I need to know if the user is not using Inventor.

 

Now isn't there something you could do with events to check if the mouse/keyboard is idle within Inventor?

 

Dave

0 Likes
Message 3 of 4

ekinsb
Alumni
Alumni

Hi Dave,

 

An OnIdle event has never been exposed through the Inventor API.  The true Windows OnIdle probably wouldn't be all that useful because it does mean that the Inventor message queue is empty so Inventor is idle but that can happen for a fraction of a second as the user is still working.

 

One possible solution is to check to see if the currently active command is the default command.  There's a propety on the Document that returns the name of the default command for that document type.  I think it's always the select command anyway.  This will tell you that the user is not currently in the middle of a command.


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

DWhiteley
Advisor
Advisor
Accepted solution

Thanks Brian,

 

 

That's what I was looking for! It is:

 

oDoc.DefaultCommand = "AppSelectNorthwestArrowCmd"

 

 

Dave

0 Likes