本帖最后由 xyp1964 于 2024-12-21 00:21 编辑
- (defun c:tt ()
- (defun xyp-dxf (code e) (cdr (assoc code (entget e))))
- (while (setq s1 (car (entsel "\n选择: ")))
- (setq pt (trans (xyp-DXF 10 s1) 0 1)
- x (* (cadr pt) 1e-3)
- y (* (car pt) 1e-3)
- xx (rtos x 2 3)
- yy (rtos y 2 3)
- )
- (princ "\nX = ")(princ xx)
- (princ "\nY = ")(princ yy)
- (alert (strcat "X=" xx "\r" "Y=" yy))
- )
- (princ)
- )
|