レイアウト、ビューポート、または印刷環境設定の標準尺度を指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: acPlotScale 列挙型、Layout および PlotConfiguration オブジェクト、acViewportScale 列挙型、PViewport オブジェクト
acPlotScale 列挙型
acViewportScale 列挙型
ビューポートをカスタム尺度を設定するには、このプロパティを acVpCustomScale に設定してから、CustomScale プロパティにカスタム尺度を定義します。
このプロパティに対する変更は図面が再作図されないと分かりません。Regen メソッドを使用して図面を再作図してください。
VBA:
Sub Example_StandardScale() ' This example will access the active layout for the current drawing ' and list the standard scale for that Layout. ' It then changes the standard scale for the layout, and finally ' resets the scale back to its original value. Dim Layout As ACADLayout Dim currScale As Integer ' Get the activeLayout Set Layout = ThisDrawing.ActiveLayout ' Find the current standard scale currScale = Layout.StandardScale MsgBox "The current standard scale is : " & Layout.StandardScale ' Change the standard scale to 100:1 Layout.StandardScale = ac100_1 MsgBox "The new standard scale is : " & Layout.StandardScale ' Reset the original standard scale Layout.StandardScale = currScale MsgBox "The new standard scale is : " & Layout.StandardScale End Sub
Visual LISP:
(vl-load-com) (defun c:Example_StandardScale() ;; This example will access the active layout for the current drawing ;; and list the standard scale for that Layout. ;; It then changes the standard scale for the layout, and finally ;; resets the scale back to its original value. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Get the activeLayout (setq Layout (vla-get-ActiveLayout doc)) ;; Find the current standard scale (setq currScale (vla-get-StandardScale Layout)) (alert (strcat "The current standard scale is : " (itoa currScale))) ;; Change the standard scale to 100:1 (vla-put-StandardScale Layout ac100_1) (alert (strcat "The new standard scale is : " (itoa (vla-get-StandardScale Layout)))) ;; Reset the original standard scale (vla-put-StandardScale Layout currScale) (alert (strcat "The new standard scale is : " (itoa (vla-get-StandardScale Layout)))) )