アクティブなビューポートの最大数を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: 整数型
アクティブなビューポートの最大数を指定します。2 <= MaxActiveViewports <= 48
非アクティブなビューポートは空白なので、内容は再作図されません。したがって、値を小さくするとパフォーマンスが向上します。初期値は 48 です。
VBA:
Sub Example_MaxActiveViewports() ' This example returns the current setting of ' MaxActiveViewports. It then changes the value, and finally ' it resets the value back to the original setting. Dim currMaxActiveViewports As Integer Dim newMaxActiveViewports As Integer ' Retrieve the current MaxActiveViewports value currMaxActiveViewports = ThisDrawing.preferences.MaxActiveViewports MsgBox "The current value for MaxActiveViewports is " & currMaxActiveViewports, vbInformation, "MaxActiveViewports Example" ' Change the value for MaxActiveViewports newMaxActiveViewports = 20 ThisDrawing.preferences.MaxActiveViewports = newMaxActiveViewports MsgBox "The new value for MaxActiveViewports is " & newMaxActiveViewports, vbInformation, "MaxActiveViewports Example" ' Reset MaxActiveViewports to its original value ThisDrawing.preferences.MaxActiveViewports = currMaxActiveViewports MsgBox "The MaxActiveViewports value is reset to " & currMaxActiveViewports, vbInformation, "MaxActiveViewports Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_MaxActiveViewports() ;; This example returns the current setting of ;; MaxActiveViewports. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq preferences (vla-get-Preferences doc)) ;; Retrieve the current MaxActiveViewports value (setq currMaxActiveViewports (vla-get-MaxActiveViewports preferences)) (alert (strcat "The current value for MaxActiveViewports is " (itoa currMaxActiveViewports))) ;; Change the value for MaxActiveViewports (setq newMaxActiveViewports 20) (vla-put-MaxActiveViewports preferences newMaxActiveViewports) (alert (strcat "The new value for MaxActiveViewports is " (itoa newMaxActiveViewports))) ;; Reset MaxActiveViewports to its original value (vla-put-MaxActiveViewports preferences currMaxActiveViewports) (alert (strcat "The MaxActiveViewports value is reset to " (itoa currMaxActiveViewports))) )