Does anyone know how to change the formatting of the COGO 'Direction' number format into a text string to import into ArcMap COGO?
I can copy paste from the direction field to a text field and it keeps the formatting but if I try and do a calculate field it just turns into a number...N14°27'50.00"E calculates to 14.4638888893333 but if I copy/paste it returns N14°27'50.00"E.
I want to use Pro but the SDE was set up using ArcMap and the 'direction' format is different.
Any suggestions?
Thanks
Solved! Go to Solution.
I tried the arcade function above and ran into an issue (possible bug) between SQL enterprise geodatabase and a file geodatabase. The script worked in the file geodatabase but not in the enterprise geodatabase where it gave the error "expecting a mutable array". NOTICE I added the Number function to the field value being passed in.
function NorthAzimuth2Quadbearing(azimuth){
return ConvertDirection( azimuth, {'directionType':'North', 'angleType': 'Degrees'}, {'directionType':'Quadrant', 'angleType': 'DMS', 'outputType': 'text', 'format': 'pd[°]mm[\']ss["]b'})
}
NorthAzimuth2Quadbearing(Number($feature.Direction))
After some research looking at the tables in SQL we decided that maybe it wasn't finding the recently added fields. We compressed the SQL geodatabase and the above Arcade expression then worked in ArcGIS Pro Field Calculator even without the Number function. Which leads me to think maybe the Arcade function isn't accessing the evw files correctly in SQL ??
If you add a COGO Enabled line feature class to the map you will get a very good-looking label expression. Just make sure to use a recent release of ArcGIS Pro (3.2 or 3.1).
You can then tweak it - it has a whole 'setting' section.
If you rather build your own you can use the Arcade method ConvertDirection