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