ExpandKey Example
Sub Example_ExpandKey() 'This example shows how to expand a layer key for the current layer standard Dim doc As AecArchBaseDocument Dim dbPref As AecArchBaseDatabasePreferences Dim cLayerKeyStyles As AecLayerKeyStyles Dim layerKeyStyle As AecLayerKeyStyle Dim cLayerKeys As AecLayerKeys Dim layerKey As AecLayerKey Set doc = AecArchBaseApplication.ActiveDocument Set cLayerKeyStyles = doc.LayerKeyStyles Set dbPref = doc.Preferences ' Sets the layer key style to the current layer standard Set layerKeyStyle = cLayerKeyStyles.Item(dbPref.LayerStandard) MsgBox "Layer Key WALL expands to: " & layerKeyStyle.ExpandKey("WALL"), _ vbInformation, "Expand Example"
End Sub