Does anyone know if it is possible to restrict a line to only draw at a specific length upon each creation? For example, we are looking to have a user draw in "U-branch" lines between our water meters that will always be 1ft long, not any shorter, not any longer.
If that is not possible, does anyone know if custom symbology can be made that always draws a "V" shape that we can connect between our water meters. This could also serve as our "U-branch" feature.
Attached image for illustrative purposes. Thanks!
Spit-balling: If they're always 1 foot, maybe you could have a script that's watching meters get created and checking within a 1-foot radius every time one is created. If it finds one, the script creates the line.
That certainly sounds like an Attribute Rule, but I genuinely don't know if the necessary functions exist, and I suspect it'd be very computationally expensive. The other alternative is a python script tool that runs on-demand and does the same thing.
As far as the "V" shape portion of your question, I think it'd have to be either/or, and that actually strikes me as harder to do than the simple line.
...Unless...
If it's purely a symbology issue, you might be able to fake something with the symbols on your meters, but it's gonna be really tricky to get the sizing of elements correct. And if you need something you can snap to/edit/etc., then symbology won't help you.
Might be stating the obvious but pressing 'd' to restrict length when digitizing. Could probably have it set as a 'task' Introduction to tasks—ArcGIS Pro | Documentation
For a quick solution, the 'd' shortcut will be your best bet as David suggested above. Your operators will have to set the distance however as it default's to the current segment length.
If this is something you do 8 hours a day then there are a few solutions:
All have pros/cons. Good candidate for an ArcGIS Idea.
Arcade code for prosperity...
// Desired fixed length in meters
var targetLen = 100;
// Get the geometry of the feature
var geom = Geometry($feature);
// If the geometry is empty or has fewer than 2 points, return as is
if (Count(geom.paths[0]) < 2) {
return geom;
}
// Get start point
var startPt = geom.paths[0][0];
// Get the azimuth (bearing) from start to end
var endPt = geom.paths[0][Count(geom.paths[0]) - 1];
var az = Angle(startPt, endPt);
//convert to radians
var angleRad = az * 0.01745
// Create a new endpoint at the fixed distance
var newEnd = Point({
x: startPt.x + targetLen * Cos(angleRad),
y: startPt.y + targetLen * Sin(angleRad),
spatialreference: geom.spatialReference
});
// Return the new geometry
return Polyline({paths: [[startPt, newEnd]], spatialReference: geom.spatialReference});