UnLockPoints Example

Land Auto

UnLockPoints Example

Sub Example_UnLockPoints()
    
    ' This examples locks a series of point numbers and
    ' then unlocks a subset of those point numbers.
    Dim cogoPnts As AeccCogoPoints
    Set cogoPnts = AeccApplication.ActiveProject.CogoPoints
    
    ' Create locked point string
    Dim pntString As String
    pntString = "1,4-8,40,10,12"
    
    ' Lock points
    cogoPnts.LockPoints (pntString)
    
    MsgBox "Locked point numbers are " & cogoPnts.LockedPointNumbers, _
    vbInformation, "UnLockPoints Example"
    
    ' Create unlock point string
    pntString = "4-8"
    
    ' Unlock points
    cogoPnts.UnlockPoints (pntString)
    
    MsgBox "Locked point numbers are " & cogoPnts.LockedPointNumbers, _
        vbInformation, "UnLockPoints Example"
    
End Sub