Test plugin written on C# without reloading 3d MAX


#1

Hi, I’m writing a plugin on C#. Could anyone tell me how to test the plug-in each time without overloading 3d max. Is it possible to write a script that will load the new version of the plugin and unload the old one?
Thanks for your answers…


#2

Anybody? Help, please…)


#3

I’ve been doing the same thing and I can’t find a solution for compiling, copying over the DLL to assemblies\bin and restart 3ds Max.

If there’s another way to do it without restarting Max all the time, I would be all up for it!

Sorry I can’t give you better news :slight_smile:


#4

try my
dll manager script
I designed it for iterating on C# .dlls without having to relaunch 3DSMax
let me know if it works for you.


#5

I’ve seen this before and it’s pretty awesome, but this does not work for plugins, or am I missing something?

This would work for independent DLL that can be used in Maxscript or something similar as a dotnet object/class.


#6

Sorry, yes, i was not written for stand alone plugins.


#7

it’s possible (in c++ not sure about c#) with a dlx script extension, OLE exposed functions and some fancy python registry jiggery pokery (also needs a registry version hack for the OLE) in conjunction with a visual studio post build event. Not for the faint hearted :wink:

oh I also forgot you might need to write a custom c based python extension to check to see if certain processes are running.


#8

Have you tried this tool from Chris Diggins? Have you watched this video about MaxDotNet from Marsel?

What apparently has changed from the video is that there is no longer a Utility plugin to change the unload option. Instead you need to manually edit the .config file to enable that functionality. The file is found in:
“C:\Users[user]\AppData\Local\Autodesk\3dsMax[version]\ENU\en-US\plugcfg”
edit “MaxDotNet.config” in your favorite text editor and change:<AllowPluginUnloading>false</AllowPluginUnloading> to true

Hopefully that will do it for you.
-Eric


#9

Eric, that is what I was looking for! I could kiss you man :smiley: But let’s leave this to a beer when we meet :slight_smile: Thanks!


#10

I haven’t dove into “real” programming yet, but atleast I remembered seeing Marsel’s video years ago. Glad I could help.

-Eric


#11

Great find! Thanks Eric. I gave up my C# project last year because I was so much slower to develop anything than in MAXScript… and this is one reason I abandoned my project. I guess my Google skills are slipping.


#12

I think major plugin development just happened here :smiley: :beer:


#13

Ephere’s MaxDotNet framework seems to have stopped with Max2012.
Is it still alive?


#14

It stopped because it was included as a part of the 3ds max 2012 advantage pack, and all versions since.

-Eric


#15

so Ephemere’s MaxDotNet is the same stuff I would find in the 3DS Max .NET SDK ?


#16

Yes, not exactly sure what has changed since the 2012 release of MaxDotNet. However, the examples, etc from the Ephere site for MaxDotNet should still apply. If you check the info for MaxDotNet the controlling files are Autodesk.Max.dll and Autodesk.Max.Wrappers.dll which both ship in 3ds max now.

-Eric


#17

Sorry but changing that config file didn`t work. MaxDotNet is still missing in the utilities list.


#18

What about the ephere Lab. Depends on what type of plugin you are writing though.
https://www.ephere.com/plugins/autodesk/max/lab/


#19

What type of plugin are you developing Alexey? In the video Marsel is doing a geometry plugin, so might only work on some types? Also only if everything is well defined, I tried on mine and didn’t work either but then I realized I have everything wrong in the plugin declaration :smiley:


#20

I am developing not only the geometry plugin. But there are no MaxDotNet in the list. Befor testing the plugin i should turn some options in that Utility. But there are no such menu item.