LayerFile Example

AEC Auto

LayerFile Example

Sub Example_LayerFile()
    
    ' This example displays the LayerFile setting for the current drawing.
    Dim dbPref As AecArchBaseDatabasePreferences
    Set dbPref = AecArchBaseApplication.ActiveDocument.preferences
    
    Dim layerfile As String
    layerfile = dbPref.LayerFile
    
    ' Test if layer file is set
    If layerfile = "" Then
        layerfile = "not set"
    End If
    
    MsgBox "The current value for LayerFile is: " & layerfile, vbInformation, "LayerFile Example"
    
End Sub