GetLayerName Example

Land Auto

GetLayerName Example

Examples:

l CrossSectionBlock (Civil Engineering Feature)

l ProfileBlock (Civil Engineering Feature)


Sub Example_GetLayerName_CrossSectionBlock()
    
    ' This example uses GetLayerName to get the grid layer name for the
    ' first cross section in the first alignment profile in the collection.
    Dim alignXSect As AeccCrossSectionBlock
    Set alignXSect = AeccApplication.ActiveDocument.CrossSectionBlocks.Item(0)
    
    MsgBox "The exisiting ground layer for the first alignment cross section in the collection is: " _
         & alignXSect.GetLayerName(kCrossSectionEGLayer), vbInformation, "GetLayerName Example"
    
End Sub

Sub Example_GetLayerName_ProfileBlock()
    
    ' This example uses GetLayerName to get the grid layer name for the
    ' first alignment profile in the collection.
    Dim alignProf As AeccAlignProfile
    Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
    
    MsgBox "The grid layer for the first ProfileBlock in the collection is: " _
         & alignProf.GetLayerName(kGrid), vbInformation, "GetLayerName Example"
    
End Sub