我是一个AutoCAD二次开发的初学者,按照网上资料做了第一个HelloWorld例子:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
namespace Lab1
{
public class Class1
{
[CommandMethod("HelloWorld")]
public void HelloWorld()
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.WriteMessage("Hello World");
}
}
}