- (defun c:tt()
- "tt(尺寸标注基点批量插块)"
- (defun xyp-R2D(r)(* r(/ 180 pi)))
- (defun xyp-dxf(code e)(cdr(assoc code(entget e))))
- (defun xyp-Ss2List(ss)(vl-remove-if-not'(lambda(x)(equal(type x)'ENAME))(mapcar'cadr(ssnamex ss))))
- (defun xyp-DelSame(lst / a l)(whilelst(setq a(car lst)lst(vl-remove a lst))(or(member a l)(setq l(append l(list a)))))l)
- (defun abc(ss bn / a lst x)
- (setq lst(mapcar'(lambda(x)(setq a(xyp-r2d(xyp-DXF 50 x)))(list(list(xyp-DXF 13 x)a)(list(xyp-DXF 14 x)a)))(xyp-Ss2List ss)))
- (mapcar'(lambda(x)(command"-insert"bn(car x)1 1(cadr x)))(xyp-DelSame(apply'append lst)))
- )
- (if(setq ss(ssget'((0 . "dim*"))))(abc ss "xlp3")) ;xlp3 图块名称
- (princ)
- )
|