马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
 - ;|
- 给表数据绘制表格线
- 参数:
- pt ---- 插入点(左上)
- lst ---- 表格型(MXN)表
- styl --- 文字样式
- txtH --- 字高
- txtwscl- 宽度比例系数
- hcellpanding--水平方向字线距(单边)
- vcellpanding--垂直方向字线距(单边)
- 返回值:
- 选择集
- 示例:
- lyrl=(("0" 5446.47) ("图层1" 3630.98) ("合计" 9077.45))
- 命令: (setq a (XD::TABLE:DRAWGRIDLINE pj lyrl "standard" 3.5 0.8 0.5 0.2))
- <Selection set: 162>
- |;
- (defun XD::Table:DrawGridLine (pj lst styl txtH txtwscl hcellpanding vcellpanding / cols height i len pj1 ss wid xDir yDir)
- (setq cols (XD::Table:ColumnsWidth lst styl txtH txtwscl hcellpanding)
- wid (apply
- '+
- cols
- )
- height (XD::Table:TotalHeight lst txtH vcellpanding)
- xDir (getvar "ucsxdir")
- yDir (getvar "ucsydir")
- yDir (xdrx_vector_negate yDir)
- )
- (setq pj1 pj)
- (setq ss (ssadd))
- (repeat (1+ (length lst)) ; 行
- (xdrx_line_make pj1 (mapcar
- '+
- pj1
- (trans (xdrx_vector_product xDir wid) 1 0 1)
- )
- )
- (ssadd (entlast) ss)
- (setq pj1 (mapcar
- '+
- pj1
- (trans (xdrx_vector_product yDir (+ txtH (* 2 vcellpanding))) 1 0 1)
- )
- )
- )
- (setq pj1 pj
- i 0
- len (length cols)
- )
- (repeat (1+ len)
- (xdrx_line_make pj1 (mapcar
- '+
- pj1
- (trans (xdrx_vector_product yDir height) 1 0 1)
- )
- )
- (ssadd (entlast) ss)
- (if (< i len)
- (progn
- (setq pj1 (mapcar
- '+
- pj1
- (trans (xdrx_vector_product xDir (nth i cols)) 1 0 1)
- )
- i (1+ i)
- )
- )
- )
- )
- ss
- )
|