rinler 发表于 2007-1-4 15:20:00

acedCommand在按扭事件中无法执行

acedCommand(...,"open",0),直接在一个ARX命令函数中可以执行,但如果是在 窗口上的一个button的onclick事件中执行该代码,则无法运行(模式和无模式窗口都不行,用的是CDialog)

JOLMO 发表于 2007-1-12 11:02:00

是你自己的问题,
setFocus转换焦点

shinjikun 发表于 2007-1-13 10:44:00

文档中有介绍:
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命令

老牛 发表于 2007-1-17 13:10:00

acedGetAcadWinApp()->OpenDocumentFile( filename );
试试看上面代码,可以和open命令一样的。

sanweizhihu 发表于 2007-3-7 08:42:00

用acDocManager->sendStringToExecute()函数执行
如:
acDocManager->sendStringToExecute(acDocManager->curDocument(),
"line 0,0 1,1 \n",false, true);
页: [1]
查看完整版本: acedCommand在按扭事件中无法执行