UCS、ブロック、印刷、またはラスター イメージの原点を WCS 座標で指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: バリアント型(倍精度実数の 2 要素配列)
媒体の左下コーナーを基準にして原点を表す X および Y の値
原点は用紙のマージンにより媒体のエッジからオフセットされます。GetPaperMargins メソッドを使用してマージンを取得します。原点はミリメートルで指定されます。
このプロパティに対する変更は図面が再作図されないと分かりません。Regen メソッドを使用して図面を再作図してください。
VBA:
Sub Example_PlotOrigin()
' This example reads and modifies the PlotOrigin
' Layout value.
' When finished, this example resets the value back to
' its original value.
Dim ACADLayout As ACADLayout
Dim originalValue As Variant
Dim newValue(0 To 1) As Double
' Get the layout object
Set ACADLayout = ThisDrawing.ActiveLayout
' Read and display the original value
originalValue = ACADLayout.PlotOrigin
MsgBox "The PlotOrigin value is set to: " & originalValue(0) & " ," & originalValue(1)
' Modify the PlotOrigin preference by toggling the value
newValue(0) = originalValue(0) + 20
newValue(1) = originalValue(1) - 20
ACADLayout.PlotOrigin = newValue
MsgBox "The PlotOrigin value is set to: " & newValue(0) & " ," & newValue(1)
' Reset the preference back to its original value
ACADLayout.PlotOrigin = originalValue
MsgBox "The PlotOrigin value is set to: " & originalValue(0) & " ," & originalValue(1)
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_PlotOrigin()
;; This example reads and modifies the PlotOrigin
;; Layout value.
;; When finished, this example resets the value back to
;; its original value.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Get the layout object
(setq ACADLayout (vla-get-ActiveLayout doc))
;; Read and display the original value
(setq originalValue (vlax-variant-value (vla-get-PlotOrigin ACADLayout)))
(alert (strcat "The PlotOrigin value is set to: " (rtos (vlax-safearray-get-element originalValue 0) 2) " ,"
(rtos (vlax-safearray-get-element originalValue 1) 2)))
;; Modify the PlotOrigin preference by toggling the value
(setq newValue (vlax-make-safearray vlax-vbDouble '(0 . 1)))
(vlax-safearray-fill newValue (list (+ (vlax-safearray-get-element originalValue 0) 20)
(- (vlax-safearray-get-element originalValue 1) 20)))
(vla-put-PlotOrigin ACADLayout newValue)
(alert (strcat "The PlotOrigin value is set to: " (rtos (vlax-safearray-get-element newValue 0) 2) " ,"
(rtos (vlax-safearray-get-element newValue 1) 2)))
;; Reset the preference back to its original value
(vla-put-PlotOrigin ACADLayout originalValue)
(alert (strcat "The PlotOrigin value is set to: " (rtos (vlax-safearray-get-element originalValue 0) 2) " ,"
(rtos (vlax-safearray-get-element originalValue 1) 2)))
)