本帖最后由 epwt 于 2011-5-31 09:31 编辑
![](source/plugin/imc_colorcode/images/loading.gif) - public static void SendStringToExecute(string command)
- {
- Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
- if (!command.EndsWith(" ")) {//确保命令后面有空格,相当于需要回车后执行命令,否则命令不执行
- command = command + " ";
- }
- doc.SendStringToExecute(command, true, false, false);
- }
调用的时候
SendStringToExecute("._zoom _all ");
就可以了。
|