几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】acedcommand在按扭事件中无法执行 (http://www.dimcax.com/hust/showthread.php?t=6072)

yang686526 2009-04-14 02:55 PM

【转帖】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.