I tested my first dll exercize for 3ds max 2018 with C#, but failed!

I tested my first dll exercize for 3ds max 2018 with C#, but failed!

Anonymous
Not applicable
552 Views
1 Reply
Message 1 of 2

I tested my first dll exercize for 3ds max 2018 with C#, but failed!

Anonymous
Not applicable

How r u, everybody! 

     I wanna begin to learn how to build the dll or app for 3ds max 2018 with C#, but very less Learning materials in China, so I learned about sth. according to the official tutorials as below:

http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-SDK-Programmer-Guide/index.html?url=files/GUID-572EF4...  ,I found there is a mistake in this line of codes:

Autodesk.Max.Global.Instance.COREInstance13.AddPrompt("Yeeehaaaaaaaaaa!");

"Global" among which could not be known by VS2015, I correct the writting method as below:

 

 

using Autodesk.Max;
using UiViewModels.Actions;

namespace ClassLibMax
{
    public class MaxDotNetCUIDemo : CuiActionCommandAdapter
    {
        public override string ActionText
        {
            get { return InternalActionText; }
        }

        public override string Category
        {
            get { return InternalCategory; }
        }

        public override void Execute(object parameter)
        {
            IGlobal global = GlobalInterface.Instance;
            global.COREInterface13.PushPrompt("Yeeehaaaaaaaaaa!");
        }

        public override string InternalActionText
        {
            get { return "Prompt me!"; }
        }

        public override string InternalCategory
        {
            get { return "3ds Max .NET Demo"; }
        }
    }
 }

issue 1:

    Now the codes passed the debug!  haha, this is my first dll test!  but during VS2015 actived the 3DS Max2018, the Max application crashed, couldn't get started. I don't know why crashed. 

Capture.JPG

issue 2:

    I builded the release dll, and put it directly into the directory: "bin\assemblies\", start 3DS Max2018, but nothing occured, there was no words as "Yeeehaaaaaaaaaa!" or"prompt me" or "3ds Max .NET Demo" showing upon the bottom of max viewport windows. why?

 

issue 3:

     I want to use "System.Runtime.InteropeService.Marshal.GetActiveObject("Max.Application")" to get instance of 3DS Max 2018, but failed.

 

 

 

0 Likes
553 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Does C# debug still need the debug version of 3ds Max as C++? Who can tell me the truth?

0 Likes