- UID
- 82552
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2003-9-27
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
我想用自己写的Move命令取代ACAD的Move命令,怎么做?
有两个办法:
1。使用
AcEdCommandStack::removeCmd Function virtual Acad::ErrorStatus
removeCmd(
const char* cmdGroupName,
const char* cmdGlobalName) = 0;
注销MOVE命令,但是其中的参数具体是什么,谁能告诉我????
我用AcEdCommandIterator找不到"MOVE"命令,
代码如下:
- [FONT=courier new]
- AcEdCommandIterator* iter = acedRegCmds->iterator();
- if (iter == NULL)
- {
- ASSERT(0);
- return;
- }
- // walk through the command stack and make a map of
- // command group to command.
- AcDbVoidPtrArray* tmpVoidPtrArray;
- for (; !iter->done(); iter->next())
- {
- AcEdCommand *pcommand = const_cast<AcEdCommand*>(iter->command());
- acutPrintf("Command LocalName:%s Command GlobalName:%s\n",
- pcommand->localName(),pcommand->globalName());
- if(0 == strcmp(pcommand->localName(),"move"))
- {
- acutPrintf("LocalName.\n");
- acutPrintf("GroupName:%s",iter->commandGroup());
- }
- if(0 == strcmp(pcommand->globalName(),"_move"))
- {
- acutPrintf("GlobalName.\n");
- acutPrintf("GroupName:%s",iter->commandGroup());
- }
- }
- delete iter;
- [/FONT]
复制代码
2。使用AcEditorReactor::commandWillStartFunction
virtual void commandWillStart(const char* cmdStr);
但是要终止原来MOVE命令如何做?
我发送ESC可以做到,但是在命令行出现"*ESC*"字样,不好,请问有好的办法么? |
|