![]() |
【转帖】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); |
| 所有的时间均为北京时间。 现在的时间是 07:00 PM. |