|
当对CommandMethod属性采用四个参数调用时,在2006中无法调用,代码如下:
using System ;
using Autodesk.AutoCAD.Runtime ;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.ApplicationServices;
[assembly: CommandClass(typeof(ClassLibrary.LSMClass))]
namespace ClassLibrary
{
///
/// Summary description for LSMClass.
///
public class LSMClass
{
public LSMClass()
{
}
// Define Command "AsdkCmd1"
[CommandMethod("Hello","Hello","Hello",CommandFlags.Session)]
static public void test() // This method can have any name
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("\nHello World"); // Put your command code here
}
}
}
个中缘由,请大家助我!
谢谢! |
|