RegisterNotification missing???

 
 
 
Posted by:moriarty72
Data created:14 October 2010

Hi,

i'm trying to use the RegisterNotification method, but i got this message during the plugin startup:

System.MissingMethodException: Method not found: 'Int32 Autodesk.Max.IGlobal.RegisterNotification(Delegate3, System.Object, Autodesk.Max.SystemNotificationCode)'.
   at d3DPlugin.d3DPluginCore.Initialize(IGlobal global, ISynchronizeInvoke sync)
   at Autodesk.Max.Manager.RegisterLoadedPlugins()

Actually i'm calling the global.RegisterNotification method inside the Initialize procedure of my IPlugin class.

I've also tried to call global.RegisterNotification "on demand" after plugin inizialization but with the same result.

I've tested it with 3DStudioMax 2009 and 3DStudioMax 2011...

Any help? Is there a work around to be notified each time the user select some node in the currente Max scene?

 

thank you in advance for any help

 

ciao,

ricky

 

 

Hi Ricky,

My best bet would be that you're trying to load the .dll compiled for the wrong version of Max. I see it has "Delegate3" in the signature its looking for, however, Max 2011 uses GlobalDelegates.Delegate4 in that same method. Please recompile the 2011 version by referencing the Max 2011 version of Autodesk.Max.dll

Let me know if this works.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Great!!! that was the problem thank you very much... and i apologized for my mistake ;) One more question ;) is there any place where i can find the meanings of the IntPtr params of the Notification Callback based upon the SystemNotificationCode params used in the RegisterNotification?   thank you again   ciao, ricky

You can marshal it to INotifyInfo structure as per 3dsmax SDK docs. Have a look here: http://www.ephere.com/autodesk/max/docs/1076.html

Marsel Khadiyev (Software Developer, EPHERE Inc.)