- (defun c:qa ( / ss ss1 p1 p2 e i ang)
- (setq ss (ssget))
- (if (not ss)
- (vl-exit-with-value 0)
- )
- (setq p1 (getpoint "\n选择复制基点"))
- (if (not p1)
- (vl-exit-with-value 0)
- )
- (setq p2 (acet-ss-drag-move ss p1 "\n选择插入点" 1))
- (setq i 0
- ss1 (ssadd)
- )
- (repeat (sslength ss)
- (setq e (ssname ss i)
- i (1+ i)
- )
- (vla-copy (vlax-ename->vla-object e))
- (setq e (entlast)
- ss1 (ssadd e ss1)
- )
- (vla-move (vlax-ename->vla-object e)
- (vlax-3D-point p1)
- (vlax-3D-point p2)
- )
- )
- (setq ang (acet-ss-drag-rotate ss1 p2 "\n选输入旋转角度" 1))
- (setq i 0)
- (repeat (sslength ss1)
- (setq e (ssname ss1 i)
- i (1+ i)
- )
- (vla-rotate (vlax-ename->vla-object e) (vlax-3D-point p2) ang)
- )
- )
必须装ET工具箱 |