cad 2016 下TABLE需“删除所有特性替代"
请问大神,我想对选中的CAD TABLE进行字高和对齐方式的调整,下面的代码在2006下能运行,但在2016下需要先“删除所有特性替代”,才能按下面的代码调整请帮忙看下,如何能解决CAD2016下不用手动去“删除所有特性替代”,直接运行代码,可达到我想要的效果
(defun c:xxx()
(setq ss nil)
(while (= ss nil)
(setq ss (ssget '((0 . "ACAD_TABLE"))))
)
(setq tb (vlax-ename->vla-object (ssname ss 0)))
(vla-settextheight tb acDataRow 1.5)
(vla-setalignment tb acDataRow acMiddleCenter)
)
需要编写程序先把所有单元格内的格式设定全部去除。
可以尝试使用http://bimarch.cn/kozmoshelp/tablexpress/tablexpresshelp.html中的TEXPSTRIP命令将表格轻量化,然后再使用你的代码。 kozmosovia 发表于 2016-8-3 15:55 static/image/common/back.gif
需要编写程序先把所有单元格内的格式设定全部去除。
可以尝试使用http://bimarch.cn/kozmoshelp/tablexpre ...
可否稍微指点一下如何删除所有特性替代? 我试了下应该和删除单元格文字格式效果不一样吧? 试一下这个
ClearTableStyleOverrides Method (ActiveX)
Clears table style overrides.
Supported platforms: Windows only
Signature
VBA:
object.ClearTableStyleOverrides flag
object
Type: Table
The object this method applies to.
flag
Access: Input-only
Type: Long; one of three integer values
0: Deletes all table and cell overrides.
1: Deletes all table overrides, but retains cell overrides.
2: Deletes all cell overrides, but retains table overrides. RemoveAllOverrides Method (ActiveX)
Removes all the overrides for a cell.
Supported platforms: Windows only
Signature
VBA:
object.RemoveAllOverrides nRow, nCol
object
Type: Table
The object this method applies to.
nRow
Access: Input-only
Type: Integer
The row number of the cell to set.
nCol
Access: Input-only
Type: Integer
The column number of the cell to set.
页:
[1]