Can I keep lines fixed?
The simple way to keep a line fixed is to make sure the line is attached on both ends to a point that is fixed. As long as the topology is on in the editing tab, a fixed point will prevent any attached line or polygon from moving.
But what if you wanted to keep specific lines as fixed based on an attribute?
We can try to copy the attribute rule constraint that is used in the point feature class to the lines. That rule is triggered on 'Update' and compares the geometry of the feature before and after the edit using the arcade method Geometry($OrigianlFeature).
But topology validation should be able to add a vertex in that line (cracking and clustering), so we should instead only make sure the end points of that line do not move.
Can this be done using Attribute Rules for specific lines?
Yes - here is a sample you can use. It checks that the start vertex and the end vertex do not changes during an edit by comparing their X and Y coordinates.
You can probably condense this expression and adjust it to your specific lines:
var IsSameFromX = (Equals(Geometry($feature).paths[0][0].x, Geometry($originalFeature).paths[0][0].x));
var IsSameFromY = (Equals(Geometry($feature).paths[0][0].y, Geometry($originalFeature).paths[0][0].y));
var IsSameToX = (Equals(Geometry($feature).paths[-1][-1].x, Geometry($originalFeature).paths[-1][-1].x));
var IsSameToY = (Equals(Geometry($feature).paths[-1][-1].y, Geometry($originalFeature).paths[-1][-1].y));
// if $feature.LineType == 1){ //comment out
if (!IsSameFromX) return false;
if (!IsSameFromY) return false;
If (!IsSameToX )return false;
If (!IsSameToY )return false;
//} //comment out
return true;
To use this in an attribute rule make sure to only trigger it on 'Update'. If you are using ArcGIS Pro 3.4 and above, limit the attribute rule to get triggered when the SHP field is modified.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.