本帖最后由 qyming 于 2016-1-7 10:19 编辑
- (setq Tblst (list
- "4cm厚AC-13C细粒式改性沥青砼"
- "AL(m)-3粘层油"
- "6cm厚AC-20C中粒式沥青砼"
- "AL(m)-3粘层油"
- "8cm厚AC-25C粗粒式沥青砼"
- "AL(m)-3粘层油"
- "1cm改性沥青碎石封层"
- "25cm厚C40水泥砼"
- "20cm厚5%水泥稳定碎石基层"
- "20cm厚4%水泥稳定碎石底基层"
- "15cm厚未筛分碎石垫层"
- )
- )
- (ayt2t (getpoint "插入点:") tblst)
- (defun ayt2t (pt Tblst / emkLine emkText textheight h len e pt0)
- (defun emkLine (startpoint endpoint)
- (entmake (list '(0 . "LINE")
- (cons 10 startpoint)
- (cons 11 endpoint)
- )
- )
- )
- (defun emkText (pt str textheight)
- (entmake (list '(0 . "TEXT")
- (cons 1 str)
- (cons 10 pt)
- (cons 40 textheight)
- (cons 41 0.8)
- (cons 11 pt)
- (cons 72 0)
- (cons 73 2)
- )
- )
- )
-
- (setq textheight (getvar "TEXTSIZE") ;字高
- h (* textheight 2) ;表格高
- len (apply 'max (mapcar 'strlen Tblst))
- ) ;文字最大值
- (foreach e (reverse Tblst)
- (emkLine pt (polar pt 0 (+ len h))) ;横线
- (setq pt0 (list (+ (car pt) h) (cadr pt))) ;定义字插入点
- (emkText (polar pt (* Pi 0.25) textheight) e textheight)
- (emkLine pt (polar pt (* Pi 0.5) h)) ;竖线
- (setq pt (polar pt (* Pi 0.5) h))
- )
- (princ)
-
- )
不知怎么成组,好修改,望大神修改 |