- (defun closepline(e / en c70 e2);;去除多段线首尾重合点并闭合
- (setq en(entget e)c70(cdr(assoc 70 en))e2(reverse en))
- (if(equal(vlax-curve-getstartpoint e)
- (vlax-curve-getpointatparam e(1-(cdr(assoc 90 en))))1e-8)
- (progn
- (vl-every'(lambda(x)(if(/=(car x)10)(setq e2(cdr e2))))e2)
- (entmod(subst(cons 70(logior c70 1))(cons 70 c70)
- (append(reverse(cdr e2))(List(assoc 210 en))))
- ))))
|