getSelectedRegion

Get the selected region.
getSelectedRegion([out] LONG *regionHandle, [out, retval] VARIANT_BOOL *isSelection)
This function returns the handle of the currently selected region, or zero if no region is selected.
VB:
Dim region As Long If viewer.getSelectedRegion(region) <> 0 Then ' do something with the region ... Else ' no region is currently selected ... End If
setSelectedRegion