NodeCreated notification param

 
 
 
Posted by:ypuech
Data created:20 September 2010

Hi,

I want to use the NodeCreated notification and I have problems to be able to convert the IntPtr param to an INode or IINode.
The SDK help states that the callParam is a pointer to the node created. The callParam is the info IntPtr argument passed to the delegate, right ?
How to convert this parameter to a node value with the current release ? Is a specific delegate defined in the GlobalDelegates needed ?

Also, I'm having problems debugging plugins with Visual Studio 2010. I'm using the latest build.
I have the dll and pdb in the MaxDotNet directory, I execute and attach 3ds Max, the plugin is loaded but the symbols are not loaded in Visual Studio.

Thanks,
Yannick

 

Hi Yannick,

To cast the info IntPtr to INotifyInfo object please look here: http://ephere.com/autodesk/max/docs/1076.html Unfortunately INativeInfo cannot be just passed in as a parameter due to a well-known .NET x64 bug.

In regards to debugging please try to put the plugin .dll/.pdb under main /plugins directory and not in MaxDotNet directory. The symbols should load ok from there.

Regards

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Thanks for the quick answer.

Sorry but I read all the forum and forgot to look at the documentation one last time before posting my problem...

For the debugging problem I found that as my dll is using .NET 4.0 I have to say to the debugger I want to debug the .NET 4.0 symbols when attaching. So debug is working fine now.

The Cleanup() function of my plugin isn't called when closing Max, is it normal ?

Regards,

Yannick

 

No problem, glad you got the debugging sorted too.

Cleanup() is only usually called when a plugin is reloaded and Max.NET usually doesn't live long enough to call it on exit. You can always register the shutdown notify callback in the SDK to make sure something gets called prior to exit though.

Marsel Khadiyev (Software Developer, EPHERE Inc.)