On INSERT of a new polygon feature in Polygon FC, the arcade attribute rule should push that to the Polyline FC?
How can we achieve this using Arcade Attribute Rules in ArcGIS Pro?
I am working on a rule to consider rings to polyline, but need to know how to push the geometry, and if I am on right track?
var geom = Geometry($feature)
var rings = geom.rings
var spatialRef = geom.spatialReference
var polyline = Polyline({
'paths':rings,
'spatialReference':spatialref
})
return polyline
Solved! Go to Solution.
Thank you so much @Jake_S,
This is what is expected, a single output:)
@Yogesh_Chavan
What you need is Attribute rule dictionary keywords , specifically the edit with adds.
Now if you are looking for a single line to represent you poly gone the code below should work; just replace your feature class name in line 11.
If you need a line for each of your polygons side, i.e. 4 sided polygon nets 4 lines, that's a bit more work.
var geom = Geometry($feature)
var rings = geom.rings
var spatialRef = geom.spatialReference
var polyline = Polyline({
'paths':rings,
'spatialReference':spatialref
})
return {
'edit': [{
'className': 'Line',
'adds': [{
'geometry': polyline,
}]
}]
}
Thank you so much @Jake_S,
This is what is expected, a single output:)