明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 298|回复: 0

调用acedCommandS后读取系统变量LastPoint问题

[复制链接]
发表于 2023-5-12 08:13 | 显示全部楼层 |阅读模式
本帖最后由 xgr 于 2023-5-12 08:17 编辑

调用acedCommandS后读取系统变量LastPoint坐标确是调用命令前的值
  1. int nRet = acedCommandS(RTSTR, _T("_copy"), RTPICKS, ss, RTSTR,_T(""),RTPOINT, basePt, RTSTR, PAUSE, RTNONE);
  2.     struct resbuf rb;
  3.     AcGePoint3d lastPoint;
  4.     acedGetVar(_T("LastPoint"), &rb);
  5.     lastPoint[X] = rb.resval.rpoint[X];
  6.     lastPoint[Y] = rb.resval.rpoint[Y];
  7.     lastPoint[Z] = rb.resval.rpoint[Z];
  8.     acutPrintf(_T("\n最后点坐标:X=%0.3f,Y=%0.3f,Z=%0.3f"), lastPoint[X], lastPoint[Y], lastPoint[Z]);

而lisp则是正确的
  1. (Setq Ss (Ssget "Cp" Px))
  2.   (Vl-Cmdf "Copy" Ss "" Dp Pause)
  3.   (Setq Dp1 (Getvar "Lastpoint"))

这个不知道为什么会这样。请教大家,谢谢!

这个copy命令PAUSE后的坐标值如何获取。




您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-3-29 23:22 , Processed in 0.189663 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表