Notifications
Clear all

[Closed] Using .NET Framework 2.0 with MAXScript and the SDK [Max 9]

Hi all,

After the thread “.NET and it’s Implications for Maxscript [Max 9]”, I open this one in order to show my WIP about using .NET with MAXScript and the SDK.

Here is the first version of a simple utility plugin using .NET ; a .NET form is created with the same style as 3ds Max :

http://ypuechweb.free.fr/Files/dotNetFrameworkTest.zip

Screenshot of the form :

9 Replies

Ey ypuech thanks a lot for sharing.

I’m gonna test it right now.

so this is using C#(.net) to make a compiled plugin for max, simillar to how c++ is done?

This is not using maxscript?

Hi Gibbz,

so this is using C#(.net) to make a compiled plugin for max, simillar to how c++ is done? This is not using maxscript?

In fact this sample uses C++/CLI in order to use .NET Framework 2.0 in C++. This extension to C++ is avaible in Visual Studio 2005.

C# cannot be used directly to develop 3ds Max plugins ; in order to do that 3ds Max SDK should need a .NET wrapper.
3ds Max does not provide a “managed” version of its SDK. However because both 3ds Max SDK and the .NET Framework are built on top of COM there is a way to communicate between a .NET class library and 3ds Max ; but this is not easy.

I’m developing a .NET wrapper to the INode class in order to, for example view this class in a property grid (pretty good .NET 2.0 user interface control).
This sample will be avaible soon.

But now we can use .NET Framework 2.0 and 3rd parties class libraries in C++ plugins ; this is very interesting in order to re-use class libraries already developed and used in the production.

another short question:

is .NET2.0 for Max 9 necessary or can i go with the new .NET 3.0 install without installing the 2.0 version ?
in other words is .NET3 backwards compatible ?

1 Reply
(@ypuech)
Joined: 11 months ago

Posts: 0

I’m not sure about the backwards compatibility between .NET 3.0 and 2.0 but I think this should work.

Yes, .NET 3.0 is completely compatible with .NET 2.0 because 3.0 versions contains the 2.0 with new parts : WPF, WCF, WWF and CardSpace.

More informations at http://www.netfx3.com/

Yannick,

I’m trying to run your example can’t seem to get it to work. It compiled without any errors or warnings and loads on startup but as soon as I select it from the Utility menu it crashes.

From debugging I found it crashes after the Test = new FrameworkTest(); statement in the dotNetFrameworkTestPlugin.cpp file.

void dotNetFrameworkTest::Init(HWND hWnd)
   {
   	Test = new FrameworkTest();
   	hVersionText = GetDlgItem(hWnd, IDC_VERSIONTEXT);
   	SetWindowText(hVersionText, Test->GetFrameworkVersion());
   }

I’ve written some plugins in the past but just so you know I really don’t know what I’m doing. So any help would be greatly appreciated.

Thanks,
Rod

BTW I’m running 32bit Max.

Hi Rod,

What version of Visual Studio are you using ? I’ve used VS 2005 to create this plugin.
Also, this plugin only works with 3ds Max 9 with Microsoft .NET Framework 2.0 installed.

Hi Yannick,

I’m using the Visual Studio 2005 Professional Trial software and running Max 9.0. I just downloaded and reinstalled Microsoft .NET Framework 2.0 which actually just gave me the option to repair it which I did. Still no go. Am I missing something here. Maybe a compiler option.

Thanks again,
Rod