Vla-getgridlineweight
- 構文
- (vla-getgridlineweight vla-object gridLineTypes rowTypes )
- 機能
- 指定した罫線の線種と行タイプの罫線の線の幅を取得する。
- 引数
-
- vla-object … VLAオブジェクト(Table、TableStyle)
- gridLineTypes … 変更する罫線の線種。(AcGridLineType 列挙型)
- acHorzBottom
- acHorzInside
- acHorzTop
- acInvalidGridLine
- acVertInside
- acVertLeft
- acVertRight
- rowTypes … 変更する行タイプ。(AcRowType 列挙型)
- acDataRow
- acHeaderRow
- acTitleRow
- acUnknownRow
- 戻り値
- 罫線に割り当てる線の太さ。(ACAD_LWEIGHT 列挙型)
- acLnWt000
- acLnWt005
- acLnWt009
- acLnWt013
- acLnWt015
- acLnWt018
- acLnWt020
- acLnWt025
- acLnWt030
- acLnWt035
- acLnWt040
- acLnWt050
- acLnWt053
- acLnWt060
- acLnWt070
- acLnWt080
- acLnWt090
- acLnWt100
- acLnWt106
- acLnWt120
- acLnWt140
- acLnWt158
- acLnWt200
- acLnWt211
- acLnWtByLayer
- acLnWtByBlock
- acLnWtByLwDefault
- サンプル
(vl-load-com) (defun c:Example_SetGridLineWeight() ;; 表スタイルを作成してスタイルの設定を変更するサンプル (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")) ;; 現在の表スタイルを取得 (setq tableStyle (vla-Item dictObj (vla-GetVariable doc "CTABLESTYLE"))) (setq colGridCurrent (vla-GetGridColor tableStyle acHorzBottom acTitleRow)) (setq lwGridCurrent (vla-GetGridLineWeight tableStyle acHorzBottom acTitleRow)) (setq visGridCurrent (vla-GetGridVisibility tableStyle acHorzTop acTitleRow)) (alert (strcat "グリッドの設定 " "\n色 (ボトム) = " (itoa (vla-get-ColorIndex colGridCurrent)) "\n線の太さ (ボトム) = " (itoa lwGridCurrent) "\n表示 (トップ)= " (if (= visGridCurrent :vlax-true) "True" "False"))) (setq col (vlax-create-object "AutoCAD.AcCmColor.20")) (vla-SetRGB col 0 0 255) (vla-SetGridColor tableStyle acHorzBottom acTitleRow col) (vla-SetGridLineWeight tableStyle acHorzBottom acTitleRow acLnWt025) (vla-SetGridVisibility tableStyle acHorzTop acTitleRow (if (= visGridCurrent :vlax-true) :vlax-false :vlax-true)) (setq colGridNew (vla-GetGridColor tableStyle acHorzBottom acTitleRow)) (setq lwGridNew (vla-GetGridLineWeight tableStyle acHorzBottom acTitleRow)) (setq visGridNew (vla-GetGridVisibility tableStyle acHorzTop acTitleRow)) (alert (strcat "新しいグリッドの設定 " "\n色 (ボトム) = " (itoa (vla-get-ColorIndex colGridnew)) "\n線の太さ (ボトム) = " (itoa lwGridnew) "\n表示 (トップ)= " (if (= visGridnew :vlax-true) "True" "False"))) ; 戻す (vla-SetGridColor tableStyle acHorzBottom acTitleRow colGridCurrent) (vla-SetGridLineWeight tableStyle acHorzBottom acTitleRow lwGridCurrent) (vla-SetGridVisibility tableStyle acHorzBottom acTitleRow visGridCurrent) (alert "表スタイルの設定を戻しました。") (vlax-release-object col) )
関連事項