StyleName Example
Sub Example_StyleName() ' This example shows the style name of an AEC Entity Dim obj As Object Dim pt As Variant ThisDrawing.Utility.GetEntity obj, pt, "Select an AEC Object" If TypeOf obj Is AecGeo Then On Error Resume Next Dim name As String name = obj.StyleName ' If the entity doesn't use a style, this will fail If (name "") Then MsgBox "Style is: " & name, vbInformation, "Style Example" Else MsgBox "AEC Entity does not have a style", vbInformation, "Style Example" End If Else MsgBox "Not a AEC Entity", vbExclamation, "Style Example" End If End Sub