如果只是监控Pline命令
[CommandMethod("tt6")] public static void test26() {
Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed = doc.Editor; Database db = doc.Database;
doc.CommandEnded += new CommandEventHandler(doc_CommandEnded);
}
static void doc_CommandEnded(object sender, CommandEventArgs e) { Document doc = sender as Document; doc.Editor.WriteMessage( "\n" + e.GlobalCommandName); } |