.NET and the 3ds Max .NET API

.NET (pronounced “dot net”) is a developer platform created by Microsoft for building many different types of applications primarily for Windows. It consists of a Common Language Runtime (CLR), which is an application virtual machine that provides services such as memory management, exception handling and security, and a Framework Class Library (FCL). The CLR allows for multiple languages (C#, Visual Basic, and F#) to be used for the same application. The richness of the FCL allows for building applications for desktop, mobile and web.

The main advantage of the .NET framework is that the combination of multi-language support, memory and exception management of the CRL, and exceptional tool support due to introspection techniques built into the framework, make for a very productive developer experience.

.NET code's performance is very close to that of C++ code, although in some cases execution delays could be observed. For example, on first launch the just-in-time compiler needs to compile code from byte-code to assembly, and if the garbage collector needs to deal with extremely large number of objects, some delays could be observed. In general, there are solutions to mitigate these drawbacks.

The 3ds Max C++ SDK has been exposed to .NET through the 3ds Max .NET API housed in the Autodesk.Max.dll assembly. Plug-in developers can use the interfaces defined in Autodesk.Max.dll to implement all plug-in types supported by 3ds Max in a similar way to deriving from a 3ds Max base class for a C++ plug-in. There is almost a one to one mapping between 3ds Max C++ SDK classes and the interfaces available in Autodesk.Max.dll. For more information on creating plug-ins in .NET, see “Lesson 7: Writing .NET Plug-ins” topic in the 3ds Max Developer Help.

MAXScript allows for working with code written in .NET, by providing ways to load .NET assemblies and instantiate (create) .NET objects, and calling their methods and access their properties. For more information see the “DotNet In MAxscript” help topic in the MAXScript Help.

Bottom line: if you are a software developer by training who is familiar with the .NET Framework, and not very familiar with C++, choose C# and the 3ds Max .NET API for writing extensions for 3ds Max.

For more information, please see the 3ds Max .NET SDK topic in the 3ds Max Developer Help.