Persistant menu like Getting Started Menu

Persistant menu like Getting Started Menu

Anonymous
Not applicable
1,050 Views
3 Replies
Message 1 of 4

Persistant menu like Getting Started Menu

Anonymous
Not applicable

I want to have some 'menu' running all the time on my plugin, whether the modeler is using another command or not. This is so that I can persistently track mouse movements with the mouse events and track what the modeler is doing. I notice that the 'getting started' menu in fusion is persistent even when I use other commands, so I'm wondering how I can create one of those in my plugin and if it has mouseevents that I can track?

 

This may be a horrible way to do this so I'm open to other recommendations. I need someway to know when a modeler has made changes to their design so that I can run a background process that checks the changes against constraints in my plugin 

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

ekinsb
Alumni
Alumni
Accepted solution

As you've seen with the "Getting Started" dialog, Fusion does support dialogs that are not associated with a command.  The "Comments" and "Text Commands" windows are other examples.  Unfortunately these types of dialogs are not yet exposed through the API.  We do plan to expose this functionality and have begun the initial work but I don't know at this time when it will be available.

 

Another area where there isn't very much support through the API is events.  The ideal thing in your case would be if there was an event that would notify you when the model has changed.  I don't think monitoring mouse events would be very efficient and it would also probably be quite expensive since mouse events occur so often.

 

I think a reasonable thing for you to do now though is to use one of the existing events that notifies when a command is started and stopped.  These are the commandStarted and commandTerminated events that are accessed through the UserInterface object.  You could do your checks after a command is terminated.  Of course there will still be some added expense in doing this because many commands don't modify the model, such as any of the view commands, the measure commands, etc. 


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

Anonymous
Not applicable

Thank you for the commandEvent recommendation. I don't think its the ideal solution, but working with what I have, its far more efficient than alternatives.

0 Likes
Message 4 of 4

Anonymous
Not applicable

Is there a convienient list anywhere of the existing command id's? This would help me sort out what actionions I would like to respond to and could efficiently compare them against a hashtable.