MenuManager.MainMenuBar unhandled exception

 
 
 
Posted by:fmenard
Data created:18 January 2011

Hi,

I am wondering if anyone ever encoutered a Max.NET unhandled exception at Autodesk.Max.Wrappers.IMenuManager.get_MainMenuBar().

Our plugin constructor is called at 3ds Max startup with a IGlobal parameter.  From there we access the global.COREInterface.MenuManager in order to add our own menu items to the main menu.  While debugging in VS2008, eveything in the MenuManager seems to be fine, except for the main menu.  This crash occurs with every Max.NET version we tried (1.2.3.0 / 1.2.5.0 / 1.2.8.0) on a Win7 computer with Max 2011.  The same code works just fine if compiled for Max 2008 with Interfaces.dll (before it became Autodesk.Max).

At this point we are wondering if there was any changes to the Max.NET API that would require us to change our code.  Another possibility would be for Max 2011 to use a different startup sequence from Max 2008 where its MainMenuBar has not been initialized while our plugin is being loaded.

We hope you can help shed some light on this issue.  Thank you.

Hello,

This is strange since I use menuManager.MainMenuBar.AddItem( this.menuItemZookeeper, -1 ); among other methods in ZK plugin and that works just fine (including max.net 1.2.8 and Max 2011).

Perhaps you are accessing MainMenuBar before Max has a chance to initialize it? Have you tried waiting for Max to load and execute your code during the post load callback?

Marsel Khadiyev (Software Developer, EPHERE Inc.)