找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1395|回复: 2

[研讨] 关于 TableStyle 中几个设置有没有Vlisp方法

[复制链接]

已领礼包: 1268个

财富等级: 财源广进

发表于 2014-11-13 15:31:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 st788796 于 2014-11-13 15:39 编辑

问题1 : 将 自定义的 TableStyle 如何设置为当前,除了 tablestyle 命令有没有 a/vlisp 方法

问题2:这个页边距是控制每个 Cell 内部文字与 GridLine 距离的,翻遍了手册也没有找到方法设置,对 Table 而言,ARX 提供的方法不比 ActiveX  多,ARX有的 ActiveX 都有

下面代码是创建一个 新 TableStyle 样式,但无法解决上面两个问题,请高手们支支招!
  1. ;|
  2. gridLineType  AcGridLineType enum; the type of the grid line

  3. acHorzBottom       Top or bottom horizontal grid line, based on the flow direction.
  4. acHorzInside       All horizontal grid lines, excluding the top and bottom lines.
  5. acHorzTop          Top or bottom horizontal grid line, based on the flow direction.
  6. acInvalidGridLine  An invalid grid line.
  7. acVertInside       All the vertical grid lines, excluding the farthest left and farthest right grid lines.
  8. acVertLeft         Farthest left grid line.
  9. acVertRight        Farthest right grid line.

  10. rowType  AcRowType enum; the row type

  11. acDataRow
  12. acHeaderRow
  13. acTitleRow
  14. acUnknownRow
  15. |;
  16. (defun XD::Table:createTableStyle (name               textHeight  /
  17.                                    dicts       tableStyle  nTableStyle
  18.                                   )
  19.   (setq        dicts            (vla-get-Dictionaries **XD::DOC**)
  20.         tableStyle  (vla-item dicts "acad_tablestyle")
  21.         nTableStyle (vla-addobject tableStyle name "AcDbTableStyle")
  22.   )
  23.   (vla-setalignment nTableStyle acDataRow acMiddleCenter)
  24.   (vla-setalignment nTableStyle acHeaderRow acMiddleCenter)
  25.   (vla-setalignment nTableStyle acTitleRow acMiddleCenter)

  26.   (vla-settextheight nTableStyle acDataRow textHeight)
  27.   (vla-settextheight nTableStyle acHeaderRow textHeight)
  28.   (vla-settextheight nTableStyle acTitleRow textHeight)

  29.   (vla-setGridVisibility
  30.     nTableStyle
  31.     acHorzTop
  32.     acTitleRow
  33.     :vlax-false
  34.   )
  35.   (vla-setGridVisibility
  36.     nTableStyle
  37.     acVertLeft
  38.     acTitleRow
  39.     :vlax-false
  40.   )
  41.   (vla-setGridVisibility
  42.     nTableStyle
  43.     acVertRight
  44.     acTitleRow
  45.     :vlax-false
  46.   )
  47. )
20141113152651.jpg
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 1268个

财富等级: 财源广进

 楼主| 发表于 2014-11-13 16:32:01 | 显示全部楼层
第一个问题找到答案了
系统变量 "CTABLESTYLE"
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

已领礼包: 1268个

财富等级: 财源广进

 楼主| 发表于 2014-11-13 16:43:09 | 显示全部楼层
本帖最后由 st788796 于 2014-11-13 16:51 编辑

第二个问题:

  (vla-put-VertCellMargin nTableStyle 1.5);_垂直边距
  (vla-put-HorzCellMargin nTableStyle 1.5);_水平边距

E 文还需要加强啊!

代码如下
  1. (defun XD::Table:createTableStyle (name               textHeight  /
  2.                                    dicts       tableStyle  nTableStyle
  3.                                   )
  4.   (setq        dicts            (vla-get-Dictionaries **XD::DOC**)
  5.         tableStyle  (vla-item dicts "acad_tablestyle")
  6.         nTableStyle (vla-addobject tableStyle name "AcDbTableStyle")
  7.   )
  8.   (vla-settextheight nTableStyle acDataRow textHeight)
  9.   (vla-settextheight nTableStyle acHeaderRow textHeight)
  10.   (vla-settextheight nTableStyle acTitleRow textHeight)
  11.   (vla-setGridVisibility nTableStyle acHorzTop acTitleRow :vlax-false)
  12.   (vla-setGridVisibility nTableStyle acVertLeft acTitleRow :vlax-false)
  13.   (vla-setGridVisibility nTableStyle acVertRight acTitleRow :vlax-false)
  14.   (vla-put-VertCellMargin nTableStyle 1.5)
  15.   (vla-put-HorzCellMargin nTableStyle 1.5)
  16.   (vla-setalignment nTableStyle acDataRow acMiddleCenter)
  17.   (vla-setalignment nTableStyle acHeaderRow acMiddleCenter)
  18.   (vla-setalignment nTableStyle acTitleRow acMiddleCenter)
  19.   (setvar "ctablestyle" name)
  20.   name
  21. )
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-4-24 22:51 , Processed in 0.366558 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表