Hi Georg,
Thank you for this latest description, I believe I understand what you want to do and it should be possible. There's one thing that needs to be defined that will affect how you do this. That is, what is the lifetime of your "command". The typical Inventor command has a short lifetime and only one command can run at a time. Completing a command will go back to the default state of Inventor or running another command will terminate the current command. You can get this kind of behavior by using the CommandManager.CreateInteractionEvents method.
Using an InteractionEvents will be the simplest approach. When the user runs your command you'll get notified through the OnExecute event of the ButtonDefinition and can create and start an InteractionEvents object. When you start the InteractionEvents object you can also connect to the OnLinearMarkingMenu or OnRadialMarkingMenu events to be able to edit the context menu when it appears. You can also listen for the OnTerminate event associated with the InteractionEvents object. This event is fired when your InteractionEvents object is stopped, which means your command is no longer running. In this even you can disconnect from the OnLinearMarkingMenu or OnRadialMarkingMenu events.
If your command isn't a standard command and the user starts it and while it's running they can go back to Inventor and continue to do other work, then you can't use an InteractionEvents object. In this case the lifetime of your "command" is defined by something else; probably until a dialog is dismissed. In this case you can still do something similar. When you display the dialog you can connect to the OnLinearMarkingMenu or OnRadialMarkingMenu events and when the dialog is dismissed you can disconnect from the OnLinearMarkingMenu or OnRadialMarkingMenu events.
Hopefully this helps.