private void sendcmd(string sCmd)
        {
            Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            string esc = "";
            string cmds = (string)AcadApp.GetSystemVariable("CMDNAMES");
            if (cmds.Length > 0)
            {
                int cmdNum = cmds.Split(new char[] { '\'' }).Length;
                for (int i = 0; i < cmdNum; i++)
                    esc += '\x03';
            }
            doc.SendStringToExecute(esc + "_." + sCmd + " ", true, false, false);
        }

 

doc.SendStringToExecute("\u001b\u001b" + sCmd + "\n", false, false, true);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案