AutoCAD2006 .net 开发之一:命令行显示
1using System;
2using Autodesk.AutoCAD.ApplicationServices;
3using Autodesk.AutoCAD.EditorInput;
4using Autodesk.AutoCAD.Runtime;
5using Autodesk.AutoCAD.DatabaseServices;
6using Autodesk.AutoCAD.Geometry;
7
8namespace 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}
2using Autodesk.AutoCAD.ApplicationServices;
3using Autodesk.AutoCAD.EditorInput;
4using Autodesk.AutoCAD.Runtime;
5using Autodesk.AutoCAD.DatabaseServices;
6using Autodesk.AutoCAD.Geometry;
7
8namespace 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}