Arcade Shape.Length Field

1076
1
12-19-2016 12:13 PM
deleted-user-YYhuCJuuEn9L
New Contributor III

The Shape.Length field (SHAPE.STLength() in my case) doesn't show up as an option in the Arcade expression builder. Is there a way to access length and area values without having to manually calculate them using the path coordinates?

0 Kudos
1 Reply
ShariF
by
New Contributor III

We got an error when trying to publish as it didn't like the Shape.STLength() field. This took several HOURS to figure out which is so silly and shouldn't be this hard. Below is the arcade expression for getting the length in feet rounded to 2 decimal places. 

// Assigns the feature's geometry to the line variable
var line = Geometry($feature);
Round(Length(line, "feet"),2);