Hello Everyone!
I am trying to rotate some symbols in my Utility Network PRO project (using ESRI template: water distribution network editor) but I can't change the ones that already have numbers.
Example: I want to change the rotation from 119 to 29, calculating on field calculator it runs, but it brings me back the same number (119). (Image attached)
Any help will be very usefull 😃
Regards,
Will have to debug the rule and build out the scenarios. Are the mains split at that location, what are the lines digitized direction. Is this the sample data?
Is the rotation set to Geographic or Arithmetic? That looks like the issue actually
Hi Michael, yes this is my sample data.
The mains are not Split (as you can see from selection) and we set to Arithmetic rotation because of the attribute rule. It seems to be following the line direction (Distribution main), but we needed it to be set to the service line.
Can you verify this is the rule you are using?
https://github.com/MikeMillerGIS/arcade-expressions/blob/master/attribute_rule_calculation/RotateFeatureByIntersectedLine.md
Based on the logic, you should be around this section of the code:
else if (Count(angles) == 2) {
// If the feature is midpan of the first line, return the angle of the second line
if (angles[0]['type'] == 'mid')
return angles[1]['angle'];
// If the feature is midpan of the second line, return the angle of the first line
else if (angles[1]['type'] == 'mid')
return angles[0]['angle'];
Can you create a pop up on taps and use this rule. Then you can add to the return statements to see what part is being users?
Such as
else if (Count(angles) == 2) {
// If the feature is midpan of the first line, return the angle of the second line
if (angles[0]['type'] == 'mid')
return “Count 2, angle 1 is mid” + angles[1]['angle'];
// If the feature is midpan of the second line, return the angle of the first line
else if (angles[1]['type'] == 'mid')
return Count 2, angle 2 is mid” + angles[0]['angle'];
Hi Michael,
It worked using the rule with multiple lines. I set everything to null using the calculate field and changed the symbology layer.
But when I insert new features, it is returning 0 and I have to calculate null values to trigger the rule. I saw there is an issue with Arcade returning 0 instead of null :BUG-000119064: Calculating a value to null using Arcade returns 0..
This is how the code looks like now: