Well, already a week has passed by since my first post. I spent some time trying to make the blog format cleaner, so now I can get into the groove and post good stuff more often. :-)
This is a quick post to share some sample code that I've been building up for use with the 3ds Max .NET API. The "enhanced" API was introduced in the 2012 Subscription Advantage Pack (SAP), and then rolled into the main product for 2013 and 2014. The samples should work in each version with some small modifications. Currently it is setup to use 3ds Max Design 2014, and uses the ADSK_MAXDES_x64_2014 environment variable to find the asemblies in the 3ds Max Design install folder. If you are using 3ds Max, you can text-edit the ADNCuiSamples.csproj before loading it, and search for $(ADSK_MAXDES_x64_2014), then replace all instances with $(ADSK_3DSMAX_x64_2014).
BTW, using environment variables makes it easy to reference the assemblies from the csproj file, and they will expand during the project load. You can also do this if you want to build and support both 3ds Max and 3ds Max Design by using your own environment variables. Note that the Visual Studio C# project editor does not allow you to use them directly via the UI.
A few of the samples use WPF UI elements and each are using the CuiActionCommandAdaptor to provide an action command to run the sample. The first time after building and loading, you will need to use the Customize User Interface (CUI) dialog to manually add the actions to a menu or toolbar.
Find the sample code here: AdnCuiSamples_BlogV01

Leave a Reply