Function Publishing in DotNet

csharp

#1

Hello,
Im trying to find a way to access to an instance of my C# object (from a 3dsMax DotNet plugin) in MaxScript.
In c++ we usually use Function Publishing, with a lot of macro definitions… But i cant find how to do the same thing in DotNet.

The “loadAssembly” methods in MaxScript seems useless, since i want to find the currently existing instance of an object, not create a new one.

Any idea ?

Thank you.


#2

It’s a bit obtuse. You have to make a dotNetObject of the C# object and then address that.

o1 = dotNetObject “Your.Dot.Net.Object”
var = getProperty o1 “foo”
setProperty o1 #foo “blahblah”


#3

Oh nevermind, indeed i can find an already existing instance of my plugin objects using dotnetclass and dotnetobject methods !

I thought it will create a new instance of the plugin using dotnet.loadAssembly, but finally i even dont need to use this function since my plugin is already loaded in 3dsMax.

Thank you.