- (defun c:tt ()
- (defun xyp-dxf (code e) (cdr (assoc code (entget e))))
- (if (and (setq s0 (car (entsel "\n选择基准对象: ")))
- (setq ss (ssget '((0 . "arc,circle"))))
- )
- (progn
- (command "undo" "be")
- (setq os (getvar "osmode"))
- (setvar "osmode" 0)
- (setq pt (xyp-dxf 10 s0))
- (setq i -1)
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p1 (xyp-DXF 10 s1))
- (command "move" s1 "" p1 pt)
- )
- (command "undo" "e")
- )
- )
- (setvar "osmode" os)
- (princ)
- )
|