直接用这个程序来旋转...不过你的属性块有问题,一移动,位置就会跑- (defun c:test( / ent ents ss i)
- (command "_.rotate" (ssget) "")
- (while (= (getvar "cmdactive") 1)
- (command pause)
- )
- (setq ss (ssget "p" '((0 . "INSERT") (2 . "CABLEEND_DOWN"))))
- (setq i 0)
- (repeat (sslength ss)
- (setq ent (ssname ss i))
- (setq m t)
- (while m
- (setq ent (entnext ent))
- (setq ents (entget ent))
- (if (= (cdr (assoc 0 ents)) "ATTRIB")
- (progn
- (setq ents (subst (cons 50 0.0) (assoc 50 ents) ents))
- (entmod ents)
- (entupd ent)
- )
- )
- (if (= (cdr (assoc 0 ents)) "SEQEND")
- (setq m nil)
- )
- )
- (setq i (1+ i))
- )
- (princ)
- )
|