请问使用(SSGET)选择的线 如何判断出 鼠标点选的座标?
请问使用(SSGET)选择的线 如何判断出 鼠标点选的座标?不使用getpoint
因为 选择物体 可能是块 也可能是线
所以 ssget 选择块 的时候 很方便
但是 ssget线不像getpoint 这个这么方便
最后还是想使用ssget 用其他办法补充getpoint
请问各位有什么办法 判断出 鼠标点选的位置吗?
学习下ssnamex函数 基本功啊!!!! (defun c:test ()
(setq run T)
(while (equal run T)
(setq res (grread T))
(setq code (car res))
;; 'normal' mouse move?
(if (equal code 5)
(progn
;; get the current cursor position
(setq pt (car (cdr res)))
;; is there something at the
;; current position?
(setq ss (ssget pt))
(if (/= ss nil)
;; yes, there is something.
;; show the grip points.
(sssetfirst nil ss)
)
)
)
;; right mouse click?
(if (equal code 25)
(progn
;; right mouse button clicked.
;; exit the loop.
(princ "\nRight mouse click.\n")
(setq run nil)
)
)
)
) (SSGET)
(setq o(cadr(grread 3)))
(car o)
(cadr o) ysq101 发表于 2018-8-11 22:51
基本功啊!!!!
那你倒是发一下啊~ 669423907 发表于 2018-8-13 09:14
(SSGET)
(setq o(cadr(grread 3)))
(car o)
3Q老铁 帮了大忙
页:
[1]