查看单个帖子
旧 2009-04-14, 02:55 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】acedcommand在按扭事件中无法执行

acedcommand在按扭事件中无法执行
acedcommand在按扭事件中无法执行
acedcommand(...,"open",0),直接在一个arx命令函数中可以执行,但如果是在 窗口上的一个button的onclick事件中执行该代码,则无法运行(模式和无模式窗口都不行,用的是cdialog)
是你自己的问题,
setfocus转换焦点
文档中有介绍:
avoiding problems with new and open
to avoid loss of synchronization between the autocad and arx communication interface, do not pass acedcommand() or acedcmd() new or open. instead, pass a script that executes new and open, answers the prompts, and calls a function in the arx application to return control to the arx application.
就是说无论如何acedcommand也不能用以open和new命令
我的qq 172522850
acedgetacadwinapp()->opendocumentfile( filename );
试试看上面代码,可以和open命令一样的。
用acdocmanager->sendstringtoexecute()函数执行
如:
acdocmanager->sendstringtoexecute(acdocmanager->curdocument(),
"line 0,0 1,1 \n",false, true);
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)