I am writing an attribute rule against Utility Network Datasets to update the Z value on point features based on the features lifecycle status to be fired on update and create. I have several data sets where the first code snippet is working as they have “regular” coordinate systems with wkid values. I have one dataset that is a custom coordinate system I have been attempting to extract the wkt value from the point feature to construct the new geometry. However, the second code snippet where I am doing this is causing Pro to crash when opening the attributes pane of this data set.
Any thoughts on the different behavior between WKT and WKID references?
Side Note: if I disable the WKT attribute rule I do not see the crashing behavior.
WKID Z Value Update no issues:
WKT Z Value Update Crashes Pro
Solved! Go to Solution.
To post formatted code:
You can massively simplify your rule. It should work with a regular coordinate system. I didn't test it with a custom system, but maybe it works there, too.
var geom = Geometry($feature)
var z = IIf($feature.LIFECYCLESTATUS == 1, 1, 0)
return Point({"x": geom.x, "y": geom.y, "z": z, "spatialReference": geom.spatialReference})
To post formatted code:
You can massively simplify your rule. It should work with a regular coordinate system. I didn't test it with a custom system, but maybe it works there, too.
var geom = Geometry($feature)
var z = IIf($feature.LIFECYCLESTATUS == 1, 1, 0)
return Point({"x": geom.x, "y": geom.y, "z": z, "spatialReference": geom.spatialReference})
This works great, was not aware of IIF logic in arcade (still new to Arcade). Thanks again!