本帖最后由 夏生生 于 2021-9-1 15:53 编辑
收币有风险,下载需谨慎,勿喷
本附件含3个函数
make-line创建直线
make-text创建单行文字
make-table创建表格
以下为示例:
- (defun c:tt (/ pt blst h ttz tdqlst tlst dis lst)
- (setq pt (getpoint "\n拾取表格插入点:")
- blst '(5 10 5 4 4)
- h 2
- ttz '(1.5 0.75 "standard")
- tdqlst '(2 2 2 2 2)
- tlst '(("序号" "名称" "重量" "数量" "备注")
- ("" "" "(kg)" "(个)" "")
- )
- dis 1
- )
- (setq lst (make-table blst h ttz tdqlst tlst pt dis))
- (entdel (cadar lst))
- (setq pt (polar pt (* 0.5 pi) (* -2 h))
- tdqlst '(2 1 2 3 2)
- tlst '(("1" "花裤衩" "0.350" "100" "没洗")
- ("2" "花背心" "0.250" "200" "")
- ("3" "人字拖" "0.800" "10" "缺底")
- ("4" "假发" "100" "6" "没洗")
- )
- )
- (setq lst (make-table blst h ttz tdqlst tlst pt dis))
- (entdel (caar lst))
- (foreach n (apply 'append (last lst))
- (if n
- (vla-put-color (vlax-ename->vla-object n) 1)
- )
- )
- )
|