前段时间试了一下复制属性块,工作忙没来得及更多测试,看一下下面的一堆英文字母是否对你有用,当前是将属性块往上复制70mm;
- (defun c:xx ( )
- (setq ent(car (entsel)))
- (setq et(entget ent))
- (setq pt(cdr (assoc 10 Et)))
- (mapcar '(lambda(x) ;;匿名函数
- (setq et(vl-remove(assoc x et)et))
- )
- '(-1 330 5 100 67 100 61 70 71 )
- )
- (setq ss (entnext ent))
- (SETQ PT2(CONS 10(POLAR PT (/ PI 2) 70)))
- (SETQ ET2(SUBST PT2 (assoc 10 Et) ET))
- (entmake et2)
- (attblockinfo SS PT)
- )
- (defun attblockinfo ( ss pt / )
- (setq elist(entget ss))
- (while
- (/= (cdr (assoc 0 elist)) "SEQEND")
- ;(setq pt(cdr(assoc 10 elist)))
- (setq pts(cdr(assoc 11 elist)))
- ;(SETQ PT2(CONS 10(POLAR PT (/ PI 2) 70)))
- (SETQ PT2s(CONS 11(POLAR PTs (/ PI 2) 70)))
- ;(setq elist(subst pt2 (assoc 10 elist) ELIST))
- (setq elist(subst pt2s (assoc 11 elist) ELIST))
- (entmake elist)
- (setq ss(entnext ss))
- (setq elist(entget ss))
- )
- (entmake (list (cons 0 "SEQEND")))
- (prin1))
|