Is there a way to calc the numerical distance between 2 letters?
In Python it would be ord("J") - ord("A") = 9
I made this on the wrong account but I can find no way to delete posts now?
Thanks
Hi @DougBrowning2 I think this JS function will do:
function returnDistance(a,b){
return Number(a.charCodeAt(0))- Number(b.charCodeAt(0));
}
I cannot use JavaScript since I work across multiple orgs.
thanks
Hi Doug. I think in that case we are out of luck.
Ended up doing it in Python after the fact.
arcpy.CalculateField_management(inTable, "SlopeReachLength", "(ord(!SlopeEndTransect!) - ord(!SlopeStartTransect!)) * !TransectSpacing!", "PYTHON_9.3")
thanks