CommandWillStart事件里的命令名是什么
public void fsa(){
Autodesk..ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument.CommandWillStart += (new CommandEventHandler(Class1.MdiActiveDocument_CommandWillStart));
Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument.CommandEnded += (new CommandEventHandler(Class1.MdiActiveDocument_CommandEnded));
}
private static void MdiActiveDocument_CommandWillStart(object sender, CommandEventArgs e)
{
Autodesk.AutoCAD.ApplicationServices.CommandEventArgs X = new Autodesk.AutoCAD.ApplicationServices.CommandEventArgs();
String commandname = X.GlobalCommandName;
Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(commandname);
}
想做个命令执行的事件,然后获取命令名的地方卡住了,请各位大大帮忙看看,命令名不是GlobalCommandName吗?,应该是什么
原来String commandname = e.GlobalCommandName; 你这是自己找到答案了?
页:
[1]