Bounds Example
Sub Example_Bounds() ' This example will display the bounds of the first profile in the drawing. Dim doc As AecArchBaseDocument Dim cProfileStyles As AecProfileStyles Dim profileStyle As AecProfileStyle Dim profile As AecProfile Set doc = AecArchBaseApplication.ActiveDocument Set cProfileStyles = doc.ProfileStyles If cProfileStyles.Count > 0 Then Set profileStyle = cProfileStyles.Item(0) Set profile = profileStyle.profile MsgBox "Profile Bounds: " & vbCR & _
" Top Left: " & Format(profile.bounds(0), "0.000") & ", " & Format(profile.bounds(1), "0.000") & vbCr & _ "Bottom Right: " & Format(profile.bounds(2), "0.000") & ", " & Format(profile.bounds(3), "0.000"), _
vbInformation, "Bounds Example" Else MsgBox "No AEC Profiles in the drawing", vbInformation, "Bounds Example" End If
End Sub