Vla-put-vertcellmargin
- 構文
- (vla-put-vertcellmargin vla-object margin )
- 機能
- セルの垂直方向の余白の値を指定する。
- 引数
-
- vla-object … VLAオブジェクト(Table、TableStyle)
- margin … 表の各セルに適用する垂直方向の余白。
- 戻り値
- nil
- サンプル
(vl-load-com)
(defun c:Example_HorzCellMargin()
;; TableStyle オブジェクトを作成し、スタイルの名前と
;; その他の属性の値を設定する。
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq dictionaries (vla-get-Dictionaries doc))
(setq dictObj (vla-Item dictionaries "acad_tablestyle"))
;; カスタム TableStyle オブジェクトを作成
(setq keyName "NewStyle"
className "AcDbTableStyle")
(setq customObj (vla-AddObject dictObj keyName className))
(vla-put-Name customObj "NewStyle")
(vla-put-Description customObj "New Style for My Tables")
(vla-put-FlowDirection customObj acTableBottomToTop)
(vla-put-HorzCellMargin customObj 0.22)
(vla-put-VertCellMargin customObj 0.22)
(vla-put-BitFlags customObj 1)
(vla-SetTextHeight customObj (+ acDataRow acTitleRow) 1.3)
(vla-SetTextStyle customObj (+ acDataRow acTitleRow) "Standard")
(setq col (vlax-create-object "AutoCAD.AcCmColor.20"))
(vla-SetRGB col 12 23 45)
(vla-SetBackgroundColor customObj (+ acDataRow acTitleRow) col)
(vla-SetGridVisibility customObj (+ acHorzInside acHorzTop) (+ acDataRow acTitleRow) :vlax-true)
(vla-SetAlignment customObj (+ acDataRow acTitleRow) acBottomRight)
(vla-SetRGB col 244 0 0)
(vla-SetGridColor customObj (+ acHorzTop acHorzInside) acDataRow col)
(alert (strcat "テーブルスタイル名 = " (vla-get-Name customObj)
"\nスタイルの説明 = " (vla-get-Description customObj)
"\n流れ = " (itoa (vla-get-FlowDirection customObj))
"\n水平セルの余白 = " (rtos (vla-get-HorzCellMargin customObj) 2)
"\n垂直方向のセルの余白 = " (rtos (vla-get-VertCellMargin customObj) 2)
"\nビットフラグ = " (itoa (vla-get-BitFlags customObj))
"\nタイトル行の文字の高さ = " (rtos (vla-GetTextHeight customObj acTitleRow) 2)
"\nタイトル行のテキスト スタイル = " (vla-GetTextStyle customObj acTitleRow)
"\nHグリッドの可視性 = " (if (= (vla-GetGridVisibility customObj acHorzBottom acTitleRow) :vlax-true) "True" "False")
"\nタイトルの配置 = " (itoa (vla-GetAlignment customObj acTitleRow))
"\nヘッダーの抑制 = " (if (= (vla-get-HeaderSuppressed customObj) :vlax-true) "True" "False")
)
)
(vlax-release-object col)
)
関連事項