HOW TO
Note: This article pertains to ArcGIS versions 8.x and 9.x. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools. Support for Visual Basic for Applications (VBA) for ArcMap and ArcCatalog ended with the ArcGIS 10.2.2 release, and Esri has not included VBA compatibility setups since version 10.5. See: ArcGIS Desktop and VBA Moving Forward.
Instructions provided describe how to convert decimal minutes data to decimal degrees (DDEG) data. This script works for string decimal minutes values in the format of: <Deg> <space> <Decimal_minutes>.
For example:
-10 30.57 100 49.3 0 25.2789 45 0 -2 0.25
dec_min=[dec_min] if IsNull(dec_min) or dec_min = "" or IsEmpty(dec_min) then dec_deg = 0 else space_pos=InStr(dec_min," ") deg=Left(dec_min,space_pos-1) min=Right(dec_min,Len(dec_min)-space_pos) min=min/60 if deg < 0 then dec_deg=(Abs(deg)+min) * -1 else dec_deg=deg+min end if end if
Get help from ArcGIS experts
Download the Esri Support App