本人录制c#CAD二次开发视频 基础入门全套,感兴趣可以淘宝搜索店铺 PT的cad小店
https://i.xue.taobao.com/detail.htm?spm=a2174.7765247.0.0.6EmxKK&courseId=11288
我们在使用CAD软件的时候,需要用到点选点来执行动作。
比如选取一个点 插入一个块
选取两个点,画一条直线
GetPoint()方法提示用户在 Command 提示时指定一个点。
PromptPointOptions 对象用来控制用户的输入及提示信息的显示方式。 PromptPointOptions 对象的 UseBasePoint 属性和BasePoint 属性控制是否从基点绘制一条橡皮筋儿线。
PromptPointOptions 对象的 Keywords属性用来定义除了指定点外还可以在 Command 提示光标处输入的关键字。
Database acCurDb = acDoc.Database;
PromptPointResult pPtRes;
PromptPointOptions pPtOpts = new PromptPointOptions("");
// 提示起点
pPtOpts.Message = optmessage;
pPtRes = acDoc.Editor.GetPoint(pPtOpts);
Point3d ptStart = pPtRes.Value;