Layout Property (ActiveX)

Specifies the layout associated with the model space, paper space, or block object.

Supported platforms: Windows only

Signature

VBA:

object.Layout
object

Type: Block, ModelSpace, PaperSpace

The objects this property applies to.

Property Value

Read-only: No

Type: Layout

The layout that is associated with the model space, paper space, or block object.

Remarks

The Layout object contains the plot settings for the model space, paper space, or block object.

Named plot settings not associated with a given block are stored as PlotConfiguration objects.

Examples

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

Visual 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)))
)