【问题标题】:running commands of autocad from c#从 c# 运行 AutoCAD 的命令
【发布时间】:2019-12-16 08:34:36
【问题描述】:

我正在开发一个使用 AutoCAD 命令的集成项目。我的目标是使用 c# 在 AutoCAD 中执行命令。在我的工作中,这是我用来打开应用程序的,但是当我执行 SendCommand() 函数来执行我想要执行的命令时,它只是转发 autocad 命令行中等待输入的文本,不会在之后自动运行发送命令()。我希望你能帮我解决这个问题。我还是这种东西的新手。非常感谢您的帮助。

这是我的代码 sn-p:

acApp1 = new AcadApplication();
acApp1.Visible =true;
acApp1.WindowState = AcWindowState.acMin;
acApp1.ActiveDocument.SendCommand("_CYLINDER")

*cylinder 只是代码的示例命令。非常感谢您的友好回复。

【问题讨论】:

    标签: c# .net autocad


    【解决方案1】:

    我想你的问题可能是因为你在命令末尾需要[space]

    acApp1.ActiveDocument.SendCommand("_CYLINDER ") ; 
    

    【讨论】:

      猜你喜欢
      • 2015-06-04
      • 2011-09-06
      • 1970-01-01
      • 2014-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-18
      相关资源
      最近更新 更多