Do you run into the issue of entering lot lines (connecting the dots) and wanting the lines to be true to their COGO measurements and in the same time snap to the points.
This is an experiment of using an attribute rule to snap to the nearest vertex (within tolerance).
The other ways of achieving the same result without the attribute rule are:
Please leave a comment with your thoughts.
Here is the Arcade expression and the screenshot of the rule:
//name: Auto Snap to Line Ends
//desc: Modify the newly created line feature to snap to the nearest vertex of the nearest line
//The attribute rule searchs for the first line and finds the nearest vertex in that line
//SETTINGS
var tolerance = 0.1; //Set your desired tolerance
var toleranceUnit = 'meter'; //Set to 'feet' or 'meter' or other
var ParcelLinesFS = FeatureSetbyName($datastore,'Parcel_Lines',['*'], true); //Set 'Points' to the fully qualified table name
//Variables
var LineEndVertexGeometry = Geometry($feature).Paths[0][1]; //geometry of end vertex
var EndX = LineEndVertexGeometry.x //the feature end vertex X
var EndY = LineEndVertexGeometry.y //the feature end vertex Y
var BufferedEndPoint = Buffer(LineEndVertexGeometry, tolerance, toleranceUnit); // buffer the $feature end vertex using the set tolerance to find lines
var nearestLine = First(Intersects(ParcelLinesFS, BufferedEndPoint)); //find the nearest line that intersects with the buffered line
var vertex = NearestVertex(nearestLine, LineEndVertexGeometry); // Get the nearest vertex of the nearest line. That's the target location.
if ((Count(Geometry($feature).paths[0]) == 2) && (vertex != null)){ //if the line is a 2 point line (not a curve or polyline) AND the nearest vertex is not empty
var x1 = TEXT(Geometry($feature).Paths[0][0].x); //start X coordinate of $feature
var y1 = TEXT(Geometry($feature).Paths[0][0].y); //start Y coordinate of $feature
var x2 = vertex.coordinate.x; //target X coordinate
var y2 = vertex.coordinate.y; //target Y coordinate
if ((x1 == X2) && (y1 == y2)) return; // safe guard for small lines not to try to snap on their own start point (which is where another line might end)
var dist = sqrt(Pow((x2-EndX),2) + Pow((y2-EndY),2)); // the distance between the end vertext of $feature and the nearest vertext
if (dist > tolerance) return; //must be smaller than set tolernace
//if we got here all that is left is update the geoemtry of $feature :-)
var SR = Geometry($feature).spatialReference; //spatial reference of the line
var polylineJSON = { //create a JSON representation of the updated line
"hasZ":true,
"paths":[[[x1,y1],[x2,y2]]],
"spatialReference":SR
};
return Polyline(polylineJSON); //return the Polyline to update the SHP field
}