Exporting a script from model builder with the hope of creating a functional python script. I need to be able to have the option of selecting my inputs. Some locations have data while others do not. I want to be able to run the script and select my inputs, while ignoring other inputs. I have multiple potential feature classes as inputs. I've identified these as variables but after running the python script, I receive the following error message.
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Input Datasets: Value is required
Failed to execute (Merge).
Here is the script:
If you want the geoprocessing to be interactive ("need to be able to have the option of selecting my inputs"), then what is the reason you do not want to leave it as a tool/model in ArcGIS?
I would like to move the code into python and out of model builder. I think the model itself is not as functional as I want it to be. Hoping to find more functionality in python.
Karen, your input parameters should be associated with parameters in a toolbox,
Running the script in standalone mode, given the number of parameters, would require you to do a lot of typing.
If you haven't created a convention tool in Arctoolbox, and are using ArcGIS Pro, then have a look
/blogs/dan_patterson/2016/05/19/toolbox-creation-in-arcgis-pro
The principles are essentially the same as in ArcMap.