Layout 属性 (ActiveX) 
指定与模型空间、图纸空间或块对象关联的布局。 支持的平台:仅限 Windows 言论该对象包含模型空间、图纸空间或块对象的打印设置。Layout 未与给定块关联的命名绘图设置将存储为对象。PlotConfiguration 例子VBA: Sub Example_Layout()
    ' This example references the Layout object obtained from model space.
    ' We then display information from the Layout object.
    
    Dim Layout As ACADLayout
    
    ' Attach to Layout object
    Set Layout = ThisDrawing.ModelSpace.Layout
    MsgBox "We now have access to the properties and methods of the model space Layout object!"
    
    ' Retrieve the name of the model space Layout
    MsgBox "The name of the model space Layout is: " & Layout.name
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_Layout()
    ;; This example references the Layout object obtained from model space.
    ;; We then display information from the Layout object.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))    
    
    ;; Attach to Layout object
    (setq Layout (vla-get-Layout (vla-get-ModelSpace doc)))
    (alert "We now have access to the properties and methods of the model space Layout object!")
    
    ;; Retrieve the name of the model space Layout
    (alert (strcat "The name of the model space Layout is: " (vla-get-Name Layout.name)))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 19:39
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.