本帖最后由 xgr 于 2023-5-12 08:17 编辑
调用acedCommandS后读取系统变量LastPoint坐标确是调用命令前的值- int nRet = acedCommandS(RTSTR, _T("_copy"), RTPICKS, ss, RTSTR,_T(""),RTPOINT, basePt, RTSTR, PAUSE, RTNONE);
- struct resbuf rb;
- AcGePoint3d lastPoint;
- acedGetVar(_T("LastPoint"), &rb);
- lastPoint[X] = rb.resval.rpoint[X];
- lastPoint[Y] = rb.resval.rpoint[Y];
- lastPoint[Z] = rb.resval.rpoint[Z];
- acutPrintf(_T("\n最后点坐标:X=%0.3f,Y=%0.3f,Z=%0.3f"), lastPoint[X], lastPoint[Y], lastPoint[Z]);
而lisp则是正确的
- (Setq Ss (Ssget "Cp" Px))
- (Vl-Cmdf "Copy" Ss "" Dp Pause)
- (Setq Dp1 (Getvar "Lastpoint"))
这个不知道为什么会这样。请教大家,谢谢!
这个copy命令PAUSE后的坐标值如何获取。
|