PointStringToArray Example

Land Auto

PointStringToArray Example

Sub Example_PointStringToArray()
    
    ' This examples returns a array of point numbers from a
    ' CogoPoints string format.
    Dim cogoPnts As AeccCogoPoints
    Set cogoPnts = AeccApplication.ActiveProject.CogoPoints
    
    Dim pntString As String
    Dim pntArray As Variant
    
    pntString = "1,4-8,40,10,12"
    
    ' Convert to array
    pntArray = cogoPnts.PointStringToArray(pntString)
    
    MsgBox "The CogoPoints point number for 1,4-8,40,10,12 are " & _
        pntArray(0) & " " & pntArray(1) & " " & pntArray(2) & " " & _
        pntArray(3) & " " & pntArray(4) & " " & pntArray(5) & " " & _
        pntArray(6) & " " & pntArray(7) & " " & pntArray(8), vbInformation, "PointStringToArray Example"
    
End Sub