I have the following VB Script expression for labeling hatches. It worked just fine in ArcMap. As I am now using ArcGIS Pro, I would like some help converting it to Arcade.
Function FindLabel ( esri__measure )
segLen = esri__measure
if right(int((segLen *3.2808399)),2) = 0 then
lblStation= int((segLen *3.2808399)/100) & "+00"
else
lblStation = int((segLen *3.2808399)/100) & "+" & right(int(segLen *3.2808399),2)
end if
FindLabel = lblStation
End Function
Solved! Go to Solution.
I have tried a second attempt. I hope that this removed the issue of pointing to our SQL Server.
Hi William Delmar ,
I was able to connect to the data and I see what you mean. The field reference I proposed has a fixed reference to the length of the line. There is a special reference that points to the measurement: $measure.
Your code would look like this:
var segLen = Round($measure * 3.2808399, 0);
return Round((segLen - (segLen % 100)) / 100, 0) + Text(segLen % 100, "+00");
Resulting in:
Maybe a small suggestion and change the interval to: 7.6199999884176 (25 feet in meters):
That should do it.
Thank you for your assistance.
Hi William Delmar ,
You are welcome. If it turns out that it works for you, could you mark the post that answered your question as the correct one? Thanks!