1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 using Autodesk.AutoCAD.ApplicationServices; 7 using Autodesk.AutoCAD.EditorInput; 8 using Autodesk.AutoCAD.Runtime; 9 10 namespace test 11 { 12 13 public class Class1 14 { 15 [CommandMethod("Hey")] 16 public void Hello() 17 { 18 Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; 19 ed.WriteMessage("Hello,dotnet!"); 20 } 21 22 } 23 }