Select to view content in your preferred language

Validating function with Calculate Value arcpy function as input

563
1
09-30-2020 03:59 PM
DylanMcDougall
Occasional Contributor

I am using the calculate value expression str(arcpy.Extent(%XMin%,%YMin%,%XMax%,%YMax%)), where the arguments are model variables of type double. Calculate Value runs correctly and outputs space separated double precision values as a string. However, when I run the next process (Extract by Rectangle) I get the warning "All of the processes are not ready to run or have already run" and the process becomes greyed out. (Note: the parameter link in the screenshot is called "rectangle" despite referring to the "extent" parameter)

How can I run Extract by Rectangle with programmatic input for the Extent parameter?

I have had a similar problem with the Extract by Circle tool

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

I suspect this is an issue with the parameter type, sometimes the help file can be unclear or misleading. Try running the extract by rectangle tool by itself, so not in a model, let it run then from the history panel export it as a python script, this will give you insight on exactly how the parameter format is set. You may find that it differs from what is documented in the help?

0 Kudos