//弹窗预警
MessageUtil.Warn(“特征点不在剖面框内”);
//CAD命令栏输出
_doc.PrintMessage(“开始提取特征点,输入“R”退出提取”);
A?B:C即判断A,若A为真则执行B,否则执行C。
(result ? “导出剖面坐标表完成。” : “导出剖面坐标表失败。”);
bool ?true-do:false-do
//读取在CAD命令栏输入的内容,带选择项的
Dictionary<string, string> dict = new Dictionary<string, string> { { “C”, “继续” }, { “R”, “退出” } };
string strKey = PromptUtil.GetKeyWord(_doc, “是否继续提取特征点”, dict, “C”);
if (string.IsNullOrWhiteSpace(strKey))
return;
switch (strKey)
{
case “R”:
_isContinueCreatePoint = false;
break;
case “C”:
_isContinueCreatePoint = true;
break;
default:
_isContinueCreatePoint = true;
break;
}
//获取CAD中二维坐标点
Document doc = CommonUtil.GetMdiDocument();
PromptPointOptions options = new PromptPointOptions("");
options.AllowNone = fals
C#二次开发CAD常用的方法和注意事项
最新推荐文章于 2024-08-16 08:49:04 发布