- (defun makepl(arg);;arg==>(list pts 闭合标志 全局宽度 线宽 图层 颜色 厚度 线型)pts以后可省略
- (entmakex(append(mapcar'cons'(0 100 100 43 370 8 62 39 6)(append'("LWPOLYLINE""AcDbEntity""AcDbPolyline")(cddr arg)))
- (cons(cons 90(length(car arg)))(cons(cons 70(if(cadr arg)(cadr arg)0))(mapcar'(lambda(x)(cons 10 x))(car arg)))))))
- (defun c:tt(/ e p l)
- (while(and(setq l nil e(car(entsel"选择需要展开的曲线")))
- (setq n(VL-CATCH-ALL-APPLY'vlax-curve-getendparam(list e)))
- (setq p(getpoint"指定展开线起点:")))
- (cond((WCMATCH(cdr(assoc 0(entget e)))"*POLYLINE")
- (while(setq p(vlax-curve-getdistatparam e n))
- (setq l(cons(polar p 0(vlax-curve-getdistatparam e n))l)n(1- n)))
- (makepl(List l)))
- (t(makepl(list(list p(polar p 0(-(vlax-curve-getdistatparam e(vlax-curve-getendparam e))(vlax-curve-getdistatparam e(vlax-curve-getstartparam e)))))))))))
|