ArrayToPointString Example

Land Auto

ArrayToPointString Example

Sub Example_ArrayToPointString()
    
    ' This examples returns a string of point numbers in CogoPoints format.
    Dim cogoPnts As AeccCogoPoints
    Set cogoPnts = AeccApplication.ActiveProject.CogoPoints
    
    Dim pntString As String
    Dim pntArray(0 To 8) As Long
    
    'Create an array with the point numbers 1,4,5,6,8,40,10,7,32
    pntArray(0) = 1: pntArray(1) = 4: pntArray(2) = 5
    pntArray(3) = 6: pntArray(4) = 8: pntArray(5) = 40
    pntArray(6) = 10: pntArray(7) = 7: pntArray(8) = 32
    
    'Convert array to string
    pntString = cogoPnts.ArrayToPointString(pntArray)
    
    MsgBox "The CogoPoints point number string is " & pntString, _
        vbInformation, "ArrayToPointString Example"
    
End Sub