Mouse events are not fired when the command is executed from the ribbon

Mouse events are not fired when the command is executed from the ribbon

Anonymous
Not applicable
546 Views
0 Replies
Message 1 of 1

Mouse events are not fired when the command is executed from the ribbon

Anonymous
Not applicable

I created a little VBA addin with a class similar to the clsSelect described in the "Interactive Selection" section of the COM API Reference. The class has a Pick method with a loop that does DoEvents while waiting for events to be fired.

 

If I make a Test sub that uses the Pick method everything works fine: Inventor waits for the click, allows for zooming in and out or clicking other ribbon buttons. The events work as expected.

 

But if I run the same Test from the _OnExecute event of a button created on the ribbon, the interface freezes and no event is fired.

I tried also with buttons created with the ribbon customization interface. The result is the same.

 

How do I prevent the interface from freezing when I start a command from the ribbon?

 

Thanks,

Stefano

0 Likes
547 Views
0 Replies
Replies (0)