|
- 回调函数是myTest3DPolyCallback, 主命令函数是MyGroupTestSendCommand3
- static int myTest3DPolyCallback(void *pData)
- {
- if (acedCmdCWasCancelled())
- {
- acutPrintf(采用T("\n3DPoly Command was cancelled..."));
- return 0;
- }
- if (is3DPolyActive())
- {
- int res = acedCommandC(&myTest3DPolyCallback, NULL, RTSTR, PAUSE, RTNONE);
- acedCallBackOnCancel();
- acutPrintf(采用T("\nmyTest3DPolyCallback: 3DPoly is active. res=%d"), res);
- return 1;
- }
- CallWhen3DPolyDone();
- return 0;
- }
- static Adesk::Boolean is3DPolyActive()
- {
- struct resbuf rb;
- acedGetVar(采用T("CMDNAMES"), &rb);
- if (采用tcsstr(rb.resval.rstring, 采用T("3DPOLY")))
- return Adesk::kTrue;
- return Adesk::kFalse;
- }
- static void CallWhen3DPolyDone()
- {
- acutPrintf(采用T("\n3DPoly Command completed..."));
- }
复制代码 |
|