1
using
System;
2 using Autodesk.AutoCAD.ApplicationServices;
3 using Autodesk.AutoCAD.EditorInput;
4 using Autodesk.AutoCAD.Runtime;
5 using Autodesk.AutoCAD.DatabaseServices;
6 using Autodesk.AutoCAD.Geometry;
7
8 namespace ClassLibrary2
9 {
10 /**//// <summary>
11 /// Class1 的摘要说明。
12 /// </summary>
13 public class Class1
14 {
15 [CommandMethod("HelloWorld")]
16 public void HelloWorld()
17 {
18 Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
19 editor.WriteMessage("I love you");
20 editor.GetPoint();
21 }
22
23 }
24}
2 using Autodesk.AutoCAD.ApplicationServices;
3 using Autodesk.AutoCAD.EditorInput;
4 using Autodesk.AutoCAD.Runtime;
5 using Autodesk.AutoCAD.DatabaseServices;
6 using Autodesk.AutoCAD.Geometry;
7
8 namespace ClassLibrary2
9 {
10 /**//// <summary>
11 /// Class1 的摘要说明。
12 /// </summary>
13 public class Class1
14 {
15 [CommandMethod("HelloWorld")]
16 public void HelloWorld()
17 {
18 Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
19 editor.WriteMessage("I love you");
20 editor.GetPoint();
21 }
22
23 }
24}