SDK: Managed code under Max 8/9

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  01 January 2008
SDK: Managed code under Max 8/9

I'm curious if anyone has tried or knows if it is possible to use Managed/CLI code under Max8 and Max9??

The main reason I ask, apart from it would be nice to use some of the components, is I'd like to use the XML parser in dotnet...I've used it a bit before and it is rather good ... I didn't say that, you can't prove anything...

Cheers
Shane
__________________
If it's worth doing, it's worth scripting
Don't wish for this to be eaiser, wish for you to better
 
  01 January 2008
Under 3ds Max 9 it's possible as the supported development platform is Visual Studio 2005 and C++/CLI was added in this version.
But for 3ds Max 8, the supported platform is Visual Studio 2002 and I've never seen code using the old Managed C++ in a 3ds Max plugin.

Using C++/CLI in a 3ds Max 9 plugin (or 2008) isn't difficult but you have to follow some rules because some parts of the code are managed and others unmanaged.
If you have 3ds Max 2008 there's an interesting sample (SceneExplorer extension) showing how to mix managed and unmanaged code in a plugin.

I have some code using C++/CLI in a 3ds Max 9 plugin for .NET 2.0 forms handling under 3ds Max. I'll upload this project on my website and I'll try to create a short plugin using the .NET XML parser.
__________________
 
  01 January 2008
That would be really cool, thanks

Shane
__________________
If it's worth doing, it's worth scripting
Don't wish for this to be eaiser, wish for you to better
 
  01 January 2008
Here is the source code of the project : http://ypuechweb.free.fr/Files/dotNetFormTest.zip

It's an utility plugin showing a .NET Form.
I'll try to create a plugin (an exporter I think) using the .NET XML parser.

Mixing managed and unmanaged isn't easy because managed types cannot be used in unmanaged code. So, wrappers or just functions (it's the case in the sample) are needed to access managed code from unmanaged code.
__________________

Last edited by ypuech : 01 January 2008 at 11:10 PM.
 
  01 January 2008
Thanks ypuech! I've had a quick look through the code and I think I understand the basic concepts...I'm sure there's plenty more questions to come.

I've been able to get your code compile (but I've not had a chance to test it), but when I compile my code, it gives me a bunch of linker errors...

I don't have it in front of me right now, but I am compiling in hybird mode.

Do you have any tips on compiler configuration.

Cheers
Shane
__________________
If it's worth doing, it's worth scripting
Don't wish for this to be eaiser, wish for you to better
 
  01 January 2008
Originally Posted by RustyKnight: I've been able to get your code compile (but I've not had a chance to test it), but when I compile my code, it gives me a bunch of linker errors...

I don't have it in front of me right now, but I am compiling in hybird mode.

Do you have any tips on compiler configuration.

What linker errors are you having ? (error number + message)

In Max 2008 SDK documentation there's some tips about mixing managed and unmanaged code. There's also a new .NET SDK containing assemblies and classes that helps a lot in programming Max plugins with the .NET Framework. I think it would be interesting to upgrade to this version if it's not done yet.
__________________
 
  01 January 2008
my bad, i needed to update the additional libaries...compiles now, just need to test it

Cheers
Shane
__________________
If it's worth doing, it's worth scripting
Don't wish for this to be eaiser, wish for you to better
 
  01 January 2008
I've developed a small utility plugin using the .NET Xml parser this week-end. I'll post the code when I'll come back home.

EDIT:
I've just updated my .NET test Utility plugin : http://ypuechweb.free.fr/dot_net_test.html

There's two versions now :
- 3ds Max 9 version uses a regular .NET Form
- 3ds max 2008 uses MaxForm from Max .NET SDK

I'll post XML Test Utility later.
__________________

Last edited by ypuech : 01 January 2008 at 09:54 AM.
 
  01 January 2008
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:57 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.