Description Example

Land Auto

Description Example

Examples:

l AeccPoint

l Alignment

l Boundary

l BreakLine

l CrossSectionPointCode (Civil Engineering Feature)

l PointGroup

l Project

l Prototype

l Surface


Sub Example_Description_AeccPoint()
    
    ' This example returns the Description setting for the
    ' first Point object in a selection set
    
    On Error Resume Next
    
    ' Delete existing SelectionSet
    ThisDrawing.SelectionSets("SSet").Delete
    
    ' Create the selection set based on a point selection
    ' and filter for the Point objects
    Dim ssetObj As AcadSelectionSet
    Set ssetObj = ThisDrawing.SelectionSets.Add("SSet")
    
    Dim gpCode(0) As Integer
    Dim dataValue(0) As Variant
    
    gpCode(0) = 0
    dataValue(0) = "AECC_POINT"
    
    Dim groupCode As Variant
    Dim dataCode As Variant
    
    ThisDrawing.Utility.Prompt vbCrLf & "Select a point object..."
    groupCode = gpCode
    dataCode = dataValue
    ssetObj.SelectOnScreen groupCode, dataCode
    
    Dim objPoint As AeccPoint
    Set objPoint = ssetObj.Item(0)
    
    MsgBox "The value for Description is: " & objPoint.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_Alignment()
    
    ' This example returns the Description for the first Alignment in the collection.
    Dim align As AeccAlignment
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    
    MsgBox "The Description of the first Alignment is: " & align.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_Boundary()
    
    ' This example returns the Description
    ' for the first Boundary in the collection.
    Dim surf As AeccSurface
    Dim bound As AeccBoundary
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set bound = surf.Inputs.Boundaries.Item(0)
    
    MsgBox "The Description for the Boundary is: " & bound.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_BreakLine()
    
    ' This example returns the Description
    ' for the first BreakLine in the collection.
    Dim surf As AeccSurface
    Dim brkLine As AeccBreakLine
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set brkLine = surf.Inputs.BreakLines.Item(0)
    
    MsgBox "The Description for the BreakLine is: " & brkLine.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_CrossSectionPointCode()
    
    ' This example returns the point code data for the first cross
    ' section surface in the collection for the first cross section
    ' in the collection.
    Dim aligns As AeccAlignments
    Dim align As AeccAlignment
    Dim xSect As AeccCrossSection
    Dim xSectPCode As AeccCrossSectionPointCode
    Set aligns = AeccApplication.ActiveProject.Alignments
    Set align = aligns.Item(0)
    Set xSect = align.CrossSections.Item(0)
    Set xSectPCode = xSect.CrossSectionPointCodes.Item(0)
    
    '  Get the alignment name
    Dim alignName As String
    alignName = align.Name
    
    ' Get the cross section station and format it
    Dim station As String
    station = aligns.DoubleToStaFormat(xSect.station)
    
    MsgBox "The alignment name is: " & alignName & vbCrLf & _
        "The first cross section is at station: " & station & vbCrLf & _
        "The data for the first point code is: " & vbCrLf & _
        vbTab & "Code: " & xSectPCode.Code & vbCrLf & _
        vbTab & "Description: " & xSectPCode.Description & vbCrLf & _
        vbTab & "Elevation: " & Format(xSectPCode.elevation, "0.00") & vbCrLf & _
        vbTab & "Offset: " & Format(xSectPCode.offset, "0.00"), _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_PointGroup()
    
    ' This function gets the Description for the first PointGroup
    ' in the collection.
    Dim pntGrp As AeccPointGroup
    Set pntGrp = AeccApplication.ActiveProject.PointGroups.Item(0)
    
    MsgBox "The Description for the first PointGroup is: " & pntGrp.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_Project()
    
    ' This example returns the Description setting for the first Project
    ' in the collection
    Dim proj As AeccProject
    Set proj = AeccApplication.Projects.Item(0)
    
    MsgBox "The Description value for the first project in the collection is: " & proj.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_Prototype()
    
    ' This example returns the Description for the first prototype in the collection.
    Dim prot As AeccPrototype
    Set prot = AeccApplication.Prototypes.Item(0)
    
    MsgBox "The Description of the first prototype is " & prot.Description, _
        vbInformation, "Description Example"
    
End Sub

Sub Example_Description_Surface()
    
    ' This example returns the Description for the first surface in the collection.
    Dim surf As AeccSurface
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    
    MsgBox "The Description for the first surface is: " & surf.Description, _
        vbInformation, "Description Example"
    
End Sub