Vla-get-textwintextcolor
- 構文
- (vla-put-textwintextcolor vla-object)
- 機能
- テキスト ウィンドウの文字の色を取得する。
- 引数
-
- vla-object … PreferencesDisplay の VLAオブジェクト
- 戻り値
- OLE_COLOR (定数)
- vbBlack
- vbRed
- vbYellow
- vbGreen
- vbCyan
- vbBlue
- vbMagenta
- vbWhite
- メモ:このプロパティの既定の色は Windows 標準のウィンドウの色。
- サンプル
(vl-load-com)
(defun c:Example_TextWinTextColor()
;; TextWinTextColor の設定を変更して元に戻すサンプル
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; Display preferences オブジェクトを取得
(setq ACADPref (vla-get-Display preferences))
;; TextWinTextColor の値を表示value
(setq currTextWinTextColor (vlax-variant-change-type (vla-get-TextWinTextColor ACADPref) vlax-vbLong))
(alert (strcat "現在の TextWinTextColor の値は " (itoa (vlax-variant-value currTextWinTextColor))))
;; 変更
(vla-put-TextWinTextColor ACADPref (vlax-make-variant acGreen 19))
(setq newValue (vlax-variant-change-type (vla-get-TextWinTextColor ACADPref) vlax-vbLong))
(alert (strcat "新しい TextWinTextColor の値は " (itoa (vlax-variant-value newValue))))
;; 戻す
(vla-put-TextWinTextColor ACADPref (vlax-variant-change-type currTextWinTextColor 19))
(alert (strcat "TextWinTextColor の値を次に戻します " (itoa (vlax-variant-value currTextWinTextColor))))
)
関連事項