StyleSheet Property (ActiveX)

Specifies the style sheet for the layout or plot configuration.

Supported platforms: Windows only

Signature

VBA:

object.StyleSheet
object

Type: Layout, PlotConfiguration

The objects this property applies to.

Property Value

Read-only: No

Type: String

The name of the style sheet.

Remarks

No additional remarks.

Examples

VBA:

Sub Example_StyleSheet()
    ' This example finds the name of the style sheet for the active layout
    
    Dim styleSheetName As String
    styleSheetName = ThisDrawing.ActiveLayout.StyleSheet
    
    If styleSheetName = "" Then
        MsgBox "There is no style sheet set for the active layout."
    Else
        MsgBox "The style sheet for the active layout is: " & styleSheetName
    End If
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_StyleSheet()
    ;; This example finds the name of the plot style for the active layout
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (setq styleSheetName (vla-get-StyleSheet (vla-get-ActiveLayout doc)))
    
    (if (= styleSheetName "")
        (alert "There is no style sheet set for the active layout.")
        (alert (strcat "The style sheet for the active layout is: " styleSheetName))
    )
)