Mfilter Where=code = "GCXXXX" $lat1 = $d_latitude $lon1 = $d_longitude Mfilter where=code = "GCYYYY" $lat2 = $d_latitude $lon2 = $d_longitude CancelFilter $data = $lat1 + " " + $lon1 + ";" + $lat2 + " " + $lon2 $DistanceString = GCalc($data,"CalcDistance") # Display error message and abort the macro if an error If Left($DistanceString,1) = "*" Cancel msg=$DistanceString EndIf $DistanceNumeric = Val($DistanceString) # now show the distance rounded to 2 decimal places $DistanceRounded = Alltrim(Str($DistanceNumeric,10,2)) MsgOk Msg="Distance between GCXXXX and GCYYYY is : $DistanceRounded" |
$data = $d_latitude + " " + $d_longitude $utm = GCalc($data,"FormatUTM") # Display error message and abort the macro if an error If Left($utm,1) = "*" Cancel msg=$utm EndIf # Replace semi colons with space for display $utm = Replace(";"," ",$utm,true) MsgOk Msg=$utm |