Hey everyone,
I'm trying to build a model to automatically generate radial lines emanating from a point. I have used the CalculateGeometryAttributes tool to generate x and y coordinates for a single point. Then I used the GetFieldValue tool to extract the x and y coordinates. These values are used as preconditions and inputs for a CalculateField tool, which adds these points to a table. But I keep getting the "The process did not execute because the precondition is false." error message.
Here's a copy of the error. As you can see, GetFieldValue was able to successfully extract the x and y coordinates from CalculateGeometryAttributes , so there is no reason for the precondition to fail.
Executing (Calculate Geometry Attributes): CalculateGeometryAttributes points "Point_X POINT_X;Point_Y POINT_Y" # # PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]] "Decimal Degrees"
Start Time: August 2, 2024 10:45:02 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.38 seconds)
Executing (Get X Value): GetFieldValue points Point_X Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
Executing (Calculate X Field): CalculateField "[filepath censored]\Default.gdb\Template_noCoords" Point_X -105.49058464 Python # Text NO_ENFORCE_DOMAINS
Start Time: August 2, 2024 10:45:03 AM
The process did not execute because the precondition is false.
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.00 seconds)
Executing (Get Y Value): GetFieldValue points Point_Y Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
Executing (Calculate Y Field): CalculateField "[filepath censored]\Default.gdb\Template_noCoords" Point_Y 50.85320402 Python # Text NO_ENFORCE_DOMAINS
Start Time: August 2, 2024 10:45:03 AM
All the inputs are not current.
This is what the model looks like, in case that helps find a solution.
Solved! Go to Solution.
Could you please try to change the Get Field Value tool Data Type parameter from "Double" to "String"?
When the Data Type is set as Double, Long, or Boolean, the precondition link considers value 0 as false.
Executing (Get X Value): GetFieldValue points Point_X Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
Executing (Get Y Value): GetFieldValue points Point_Y Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
It may help to lay out your model from left to right so you can more easily see the sequence.
It looks as though that branch that starts at Radial Lengths Table Template doesn't get to run because it depends on things that have not executed yet.
Might also look at this Python toolbox.
https://github.com/Esri/military-tools-geoprocessing-toolbox
I've reorganized the layout, hopefully it's a bit more clear. There are pre-condition arrows to force other processes to run before the radial lengths table template can be used.
The funny thing is that this model actually worked perfectly before, but for some reason doesn't work anymore. Here's the correct output it generated previously:
If you know of any pre-built ESRI tool that can achieve this same result, please let me know! I have no clue what the problem is with the model or how to fix it because it worked perfectly fine before, but doesn't work anymore.
Could you please try to change the Get Field Value tool Data Type parameter from "Double" to "String"?
When the Data Type is set as Double, Long, or Boolean, the precondition link considers value 0 as false.
Executing (Get X Value): GetFieldValue points Point_X Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
Executing (Get Y Value): GetFieldValue points Point_Y Double 0
Start Time: August 2, 2024 10:45:03 AM
Succeeded at August 2, 2024 10:45:03 AM (Elapsed Time: 0.01 seconds)
Thank you! That seemed to solve the issue.