Specifies the block associated with the layout or multileader style.
Supported platforms: Windows only
Read-only: No
Type: String
The MLeaderStyle block ID.
No additional remarks.
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))) )