Create a new Table Style with modified Title, Header and Data values

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can create a new Table Style and change the following.
What I can't figure out is how to modify -
Cell Styles (Title, Header, Data) and all their values (General, Text, Borders)
Table Direction (up/down)
(defun C:MakeTableStyle ()
(setq Table_Name "MyTable")
(setq Acad_Obj (vla-get-activedocument (vlax-get-acad-object)))
(setq Acad_Dict (vla-get-dictionaries Acad_Obj))
(setq Table_Dict (vla-item Acad_Dict "ACAD_TABLESTYLE"))
(setq TS_Obj (vla-addObject Table_Dict Table_Name "AcDbTableStyle"))
(vla-put-HorzCellMargin TS_Obj 0.05)
(vla-put-VertCellMargin TS_Obj 0.05)
(vla-put-TitleSuppressed TS_Obj :vlax-false)
(vla-put-HeaderSuppressed TS_Obj :vlax-false)
(vla-put-Description TS_Obj (strcat "Table Style = " Table_Name))
(if (and TS_Obj (not (vlax-object-released-p TS_Obj))) (vlax-release-object TS_Obj))
(if (and Table_Dict (not (vlax-object-released-p Table_Dict))) (vlax-release-object Table_Dict))
(if (and Acad_Dict (not (vlax-object-released-p Acad_Dict))) (vlax-release-object Acad_Dict))
(if (and Acad_Obj (not (vlax-object-released-p Acad_Obj))) (vlax-release-object Acad_Obj))
(princ)
)