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:
- var geom_text = Text(Geometry($feature));
- var geom = Dictionary(geom_text);
- var xGeo = geom.x
- var yGeo = geom.y
- var spatialRef = geom.spatialReference
- var wkidVal = spatialRef.wkid
- var zGeoProposed = 1
- var zGeoOther = 0
- if($feature.LIFECYCLESTATUS != 1){
- var newGeo = Point({"x": xGeo, "y": yGeo, "z":zGeoOther, spatialReference: {wkid: wkidVal}})
- }
- else{
- var newGeo = Point({"x": xGeo, "y": yGeo, "z": zGeoProposed, spatialReference: {wkid: wkidVal}})
- }
- return newGeo;
-
WKT Z Value Update Crashes Pro
- var geom_text = Text(Geometry($feature));
- var geom = Dictionary(geom_text);
- var xGeo = geom.x
- var yGeo = geom.y
- var spatialRef = geom.spatialReference
- var wktVal = spatialRef.wkt
- var wkidVal = null
-
- var zGeoProposed = 1
- var zGeoOther = 0
-
- if($feature.LIFECYCLESTATUS != 1){
- var newGeo = Point({"x": xGeo, "y": yGeo, "z":zGeoOther, spatialReference: {wkt: wktVal }})
- }
- else{
- var newGeo = Point({"x": xGeo, "y": yGeo, "z": zGeoProposed, spatialReference: {wkt: wktVal }})
- }
- return newGeo;