AutoCAD.Net/C#.Net QQ群:193522571 C# ^C^C模拟,中止当前命令执行下一个命令

        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);
        }

 

AutoCAD.Net/C#.Net QQ群:193522571 C# ^C^C模拟,中止当前命令执行下一个命令

上一篇:调用图灵API V2 遇到的坑


下一篇:C#[WinForm]实现自动更新