Block Property (ActiveX)

Specifies the block associated with the layout or multileader style.

Supported platforms: Windows only

Signature

VBA:

object.Block
object

Type: Layout, MLeaderStyle

The objects this property applies to.

Property Value - Layout

Read-only: Yes

Type: Block

The block associated with the layout.

Property Value - MLeaderStyle

Read-only: No

Type: String

The MLeaderStyle block ID.

Remarks

No additional remarks.

Examples

VBA:

Sub Example_LayoutBlock()
    ' This example finds the name of the block associated with a layout.
    
    Dim xBlock As AcadBlock
    Set xBlock = ThisDrawing.ActiveLayout.Block
    
    MsgBox "The active layout corresponds to block: " & xBlock.name
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_LayoutBlock()
    ;; This example finds the name of the block associated with a layout.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq xBlock (vla-get-Block (vla-get-ActiveLayout doc)))
    
    (alert (strcat "The active layout corresponds to block: " (vla-get-Name xBlock)))
)