Some of the questions about the menu,

 
 
 
Posted by:SITT
Data created:12 April 2010

very thanks, i build "add action to 3dsmax main menu" ,

it's work ,but , after i delete this dll

=..=

This can be auto  cleared when delete plugin.dll ?


Attached Files:
Image 1

The menu entries can only be manually cleared. You would need to have an uninstaller script remove them. This is the only way I know.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

thanks, i hope show winform in ActionItem ExecuteAction mehod

        public override bool ExecuteAction()
        {
            // execute me
            TestForm dialog = new TestForm(global);
            dialog.Show();
            return true;
        }

how to get IGlobal  global?

 

You need to create a class derived from IPlugin. IGlobal is passed into Initialize(...) method.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

        public override bool ExecuteAction()
        {
            MessageBox.Show("ok");
            return true;
        }

        public override bool Execute()
        {
            MessageBox.Show("ok Execute");
            return true;
        }

 

when i click menuitem , No  any response

You could have your plugin destroy all the menu stuff on application close.

why,my test project,menu cannot execute action?


Attached Files:

>TestMaxDotNet.zip (10862 bytes),

duke,  thank you

why  cannot execute action?

who can help me?

thanks

I am going to test this now, will let you know what I find.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

I forgot to mention adding MyActionCallback callback class. I have updated the documentation to reflect this. I'm also attaching your updated code that should work now.


Attached Files:

>TestMaxDotNet.rar (19956 bytes),

Marsel Khadiyev (Software Developer, EPHERE Inc.)

very very thank you,i am a newbie,In the past I use only MaxScript

thank you

No problem, post any questions if you have them and I'll try to answer.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

"You could have your plugin destroy all the menu stuff on application close."

 I searching  Sdk Document with what key word?

By that I meant "void MenusAndActionsUnregister()" function. You can add code there to remove your menu entry before plugin unloads.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

thank you , i dont know

how to do like  MaxScript code  with max.net

---------------------------------

callbacks.addScript #preSystemShutdown "xxxxxx()"

--------------------------------

    class TestExitCallBack : IExitMAXCallback
    {
        Test theTest;

        public TestExitCallBack(Test theTest)
        {
            this.theTest = theTest;
        }

        public bool Exit(IntPtr hWnd)
        {
            theTest.MenusAndActionsUnregister();
            return true;
        }

        public void Dispose()
        {

        }

        public bool Equals(IExitMAXCallback pIExitMAXCallback)
        {
            return true;
        }
    }

 

 

MaxGlobal.COREInterface.RegisterExitMAXCallback(new TestExitCallBack(this));

 

cant execute

O_O

 

Please derive your class from Autodesk.Max.Plugins.ExitMAXCallback, not IExitMAXCallback. You always derive from class in Plugins namespace.

Also have a look here.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

very thanks