Vla-get-textfontsize

提供:GizmoLabs - だいたい CAD LISP なサイト
印刷用ページはサポート対象外です。表示エラーが発生する可能性があります。ブラウザーのブックマークを更新し、印刷にはブラウザーの印刷機能を使用してください。
構文
(vla-get-textfontsize vla-object )


機能
新しい文字のフォント サイズを取得する。


引数
  • vla-object … PreferencesDisplay のVLAオブジェクト


戻り値
新しい文字のフォント サイズ。フォント サイズの制限はフォントによって決まる。


  • このプロパティの初期値は 10。


サンプル
(vl-load-com)
(defun c:Example_TextFontSize()
    ;; TextFontSize の現在の設定を返す。
    ;; 値を変更し、最後に元の設定に戻す値をリセットする。
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; 現在のフォントサイズを取得
    (setq currTextFontSize (vla-get-TextFontSize (vla-get-Display preferences)))
    (alert (strcat "現在のフォントサイズは " (itoa currTextFontSize)))
    
    ;; 変更
    (vla-put-TextFontSize (vla-get-Display preferences) 12)
    (alert (strcat "新しいフォントサイズは " (itoa (vla-get-TextFontSize (vla-get-Display preferences)))))
    
    ;; 戻す
    (vla-put-TextFontSize (vla-get-Display preferences) currTextFontSize)
    (alert (strcat "フォントサイズを次に戻しました " (itoa (vla-get-TextFontSize (vla-get-Display preferences)))))
)

関連事項