本帖最后由 xyp1964 于 2020-11-19 23:34 编辑
- ;; xyp-Entmake-lwPolyline 建立多段线 (xyp-Entmake-lwPolyline 点集 闭合参数)
- ;; 闭合参数tn: t闭合,nil打开
- ;; xyp-Entmake-LwPl=xyp-Entmake-lwPolyline
- (defun xyp-Entmake-lwPolyline (ptlst Close-tnil / a s1)
- (entmake (append (list '(0 . "LWPOLYLINE")
- '(100 . "AcDbEntity")
- '(100 . "AcDbPolyline")
- (cons 90 (length ptlst))
- (cons 70 (if Close-tnil 1 0))
- (cons 38
- (if (nth 2 (car ptlst))
- (nth 2 (car ptlst))
- 0
- )
- )
- )
- (mapcar '(lambda (a) (cons 10 a)) ptlst)
- )
- )
- (entlast)
- )
|