how to execute MaxScript in Max.Net

 
 
 
Posted by:SITT
Data created:16 December 2009

how to execute MaxScript in Max.Net

thanks 

<p>namespace TestMaxDotNetMenu

{

&nbsp;&nbsp; &nbsp;public class TestMenu : IPlugin

&nbsp;&nbsp; &nbsp;{

&nbsp;

&nbsp;

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public void Cleanup()

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{

&nbsp;

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public void Initialize(IGlobal global, System.ComponentModel.ISynchronizeInvoke sync)

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MessageBox.Show("TestMenu With MaxDotNet");

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IInterface MaxInterface = global.COREInterface;

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IPrimitive primZKLaunch = global.Primitive.Create("ZKLaunch",Launch);

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}

&nbsp;

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public void Launch()

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MessageBox.Show("Launch");

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;}

}

</p>

&nbsp;

why, error on &nbsp;"global.Primitive.Create("ZKLaunch",Launch);"

my english very poor, sorry

software is max9 + vs2005

Please have a look at this

Marsel Khadiyev (Software Developer, EPHERE Inc.)

thanks