Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I'm trying to make communication between two plugin .NET
I managed to raise a callback from the first plugin and register the second plugin to that callback
GlobalInterface.Instance.BroadcastNotification(SystemNotificationCode.PreExport, filePaths);
in the second plugin, I grab the callback with
IGlobal global = Autodesk.Max.GlobalInterface.Instance;
IInterface18 ip = global.COREInterface18;
if (!callbackRegistered)
{
this.fileSaveHandler = new GlobalDelegates.Delegate5(this.Global_PreFileSave);
GlobalInterface.Instance.RegisterNotification(this.fileSaveHandler, null,SystemNotificationCode.PreExport);
callbackRegistered = true;
}
Now the problem is that I need to retrieve an object between these two plugins
In this case an array of string is passed to GlobalInterface.Instance.BroadcastNotification
public void Global_PreFileSave(IntPtr obj, INotifyInfo _param1) { object listFiles = _param1.CallParam;
string[] files = ((IEnumerable)listFiles).Cast<object>().Select(x => x.ToString()).ToArray(); // here I'm stacked }
Any idea on how to retrieve this object?
Thanks
Solved! Go to Solution.