ActiveCommand

ActiveCommand

Rene_Gerlach
Advocate Advocate
486 Views
3 Replies
Message 1 of 4

ActiveCommand

Rene_Gerlach
Advocate
Advocate

How to get the ActiveCommand from my CommandControl Execute, or why is this not set?

 

Background:

I've more commands added to Inventor.

Also I attached to some Inventor Events.

The problem (or missing internal Inventor functionality) is that the CommandManager.ActiveCommand will not be set.

Also the NameValueMap didn't have this information.

 

Of course I can set my own internal variable to the Command, but all other Addins / Inventor self didn't known this...

 

Or did I something missing?

 

Cheers

René

 

PS: Sorry posted this first in General, if possible you can delete this there.

 

0 Likes
487 Views
3 Replies
Replies (3)
Message 2 of 4

BrandonBG
Collaborator
Collaborator

CommandManager.ActiveCommand gets a string of characters that is the name of the command. By nature, this will only have a value while the ControlDefinition is running.

 

Can you give specific command that is giving you a problem?

 

Brandon

0 Likes
Message 3 of 4

Rene_Gerlach
Advocate
Advocate

Hello,

indeed what you tell is what I expected.

Samples which are not working are Tube&Pipe or my own command.

There are some more..

 

Cheers

 

René 

0 Likes
Message 4 of 4

adam.nagy
Autodesk Support
Autodesk Support

Hi Rene,

 

I could reproduce the behaviour and logged it in our system: #112949

So it seems that the Tube & Pipe commands do not set the name for the interaction - more info here:

http://adndevblog.typepad.com/manufacturing/2015/12/onactivatecommand-not-firing-for-my-command.html

 

Cheers,

 



Adam Nagy
Autodesk Platform Services
0 Likes