AnnSetUnit example for Visual Basic
Dim nUnit As Integer, nPrecision As Integer, Distance2 As Single
LEAD1.AnnGetUnit hCrossProd, nUnit, nPrecision
nUnit = (nUnit + 1) Mod 10
LEAD1.AnnSetUnit hCrossProd, nUnit + ANNUNIT_DEF_ABBR, vbNullString, 2, False
LEAD1.AnnSetGaugeLength hCrossProd, 3, False
MsgBox "Unit: " & LEAD1.AnnGetUnit (hCrossProd, nUnit, nPrecision) & Chr(13) _
& "Distance: " & LEAD1.AnnGetDistance (hCrossProd, Distance2) & Chr(13) _
& "Gauge Length: " & LEAD1.AnnGetGaugeLength (hCrossProd)