Removeable Example

AEC Auto

Removeable Example

Sub Example_Removeable()

'This example shows whether the layer is removeable

    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)
    Set cLayerKeys = layerKeyStyle.Keys
    
    For Each layerKey In cLayerKeys
        Debug.Print layerKey.Name
        Debug.Print " Color      - " & layerKey.Color
        Debug.Print " Layer      - " & layerKey.Layer
        Debug.Print " LineType   -  " & layerKey.Linetype
        Debug.Print " Lineweight - " & layerKey.Lineweight
        Debug.Print " Plotstyle  - " & layerKey.PlotStyleName
        Debug.Print " Plottable  -  " & layerKey.Plottable
        Debug.Print " Removable  -  " & layerKey.Removeable
    Next

End Sub