PlotRotation 属性 (ActiveX) 
指定布局或打印配置的旋转角度。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举acPlotRotation 
 言论旋转角度相对于物体 WCS 的 X 轴,从 Z 轴向下看原点时,正角逆时针方向。 在重新生成图形之前,对此属性的更改将不可见。使用该方法重新生成图形。Regen 例子VBA: Sub Example_PlotRotation()
    ' This example reads and modifies the PlotRotation
    ' Layout value.
    ' When finished, this example resets the  value back to
    ' its original value.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Integer
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.PlotRotation
    MsgBox "The PlotRotation value is set to: " & originalValue
    ' Modify the PlotRotation preference by toggling the value
    ACADLayout.PlotRotation = ac180degrees
    MsgBox "The PlotRotation preference has been set to: " & ACADLayout.PlotRotation
    ' Reset the preference back to its original value
    ACADLayout.PlotRotation = originalValue
    MsgBox "The PlotRotation preference was reset back to: " & originalValue
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_PlotRotation()
    ;; This example reads and modifies the PlotRotation
    ;; 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 (vla-get-PlotRotation ACADLayout))
    (alert (strcat "The PlotRotation value is set to: " (itoa originalValue)))
    ;; Modify the PlotRotation preference by toggling the value
    (vla-put-PlotRotation ACADLayout ac180degrees)
    (alert (strcat "The PlotRotation preference has been set to: " (itoa (vla-get-PlotRotation ACADLayout))))
    ;; Reset the preference back to its original value
    (vla-put-PlotRotation ACADLayout originalValue)
    (alert (strcat "The PlotRotation preference was reset back to: " (itoa originalValue)))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 20:15
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.