Vla-put-maxactiveviewports

提供:GizmoLabs - だいたい CAD LISP なサイト
2016年1月29日 (金) 00:07時点におけるGizmon (トーク | 投稿記録)による版 (ページの作成:「{{AutoLISP}} ; 構文 : (vla-put-maxactiveviewports ''vla-object'' ''max'' ) ; 機能 : アクティブなビューポートの最大数を指定する。 ; 引数 :...」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
構文
(vla-put-maxactiveviewports vla-object max )


機能
アクティブなビューポートの最大数を指定する。


引数
  • vla-object … DatabasePreferences の VLAオブジェクト
  • max … アクティブなビューポートの最大数。有効範囲 2 から 48


戻り値
nil


  • MEMO: 非アクティブなビューポートは空白なので、内容は再作図されない。したがって、値を小さくするとパフォーマンスが向上する。初期値は 48。
  • 注 : このプロパティの値は、システム変数 MAXACTVP に格納される。


サンプル
(vl-load-com)
(defun c:Example_MaxActiveViewports()
    ;; MaxActiveViewports の設定を変更するサンプル。
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))  
    (setq preferences (vla-get-Preferences doc))
    
    ;; 現在の MaxActiveViewports 値
    (setq currMaxActiveViewports (vla-get-MaxActiveViewports preferences))
    (alert (strcat "現在の MaxActiveViewports 値は " (itoa currMaxActiveViewports)))
    
    ;; 変更
    (setq newMaxActiveViewports 20)
    (vla-put-MaxActiveViewports preferences newMaxActiveViewports)
    (alert (strcat "新しい MaxActiveViewports 値は " (itoa newMaxActiveViewports)))
    
    ;; 戻す
    (vla-put-MaxActiveViewports preferences currMaxActiveViewports)
    (alert (strcat "MaxActiveViewports 値を戻しました " (itoa currMaxActiveViewports)))
)

関連事項