Autocad命令返回值 [英] Autocad command return value

查看:168
本文介绍了Autocad命令返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经使用了acad electrial并希望在cad命令窗口输入命令后获得返回值。

示例如下,

1)输入代码是

文档doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

string command =(c:wd_mdb_get_proj_scratch_dbnam nil);

doc.SendStringToExecute(command,false,false,false);



2)返回值为C:\\Users \\ \\\xxxxxx \\AppData \\Roaming\\Autodesk \\ Aututo Electrical 2015 \\R20.0 \\xxx \\\\\\\\\\\\\ \ 0003.mdb



我想要一个no.2文本。我应该怎么做?



谢谢......



我的尝试:



Hi
I have used acad electrial and want to get return value after input command in cad command window.
Example is below,
1) Input code is
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
string command = "(c:wd_mdb_get_proj_scratch_dbnam nil) ";
doc.SendStringToExecute(command, false, false, false);

2) return value is "C:\\Users\\xxxxxx\\AppData\\Roaming\\Autodesk\\AutoCAD Electrical 2015\\R20.0\\xxx\\Support\\user\\0003.mdb"

I want a no.2 text. How should I do?

Thanks......

What I have tried:

Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
            string command = "(c:wd_mdb_get_proj_scratch_dbnam nil) ";
            doc.SendStringToExecute(command, false, false, false);

推荐答案

检查:获取autocad绘图的名称。 - Autodesk社区 [ ^ ]


这篇关于Autocad命令返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆