AnsweredAssumed Answered

Model Builder exported to Script defciency

Question asked by witselkl on Feb 21, 2019
Latest reply on Feb 21, 2019 by Dan_Patterson

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: 

 

# Import arcpy module
import arcpy
# Script arguments
PotentialArea_A = arcpy.GetParameterAsText(0)
ProtectiveZone_A = arcpy.GetParameterAsText(1)
Wetland_A = arcpy.GetParameterAsText(2)
...
# Local variables:
Merge = "...Merge"
Dissolve = "...Dissolve"
# Process: Merge
arcpy.Merge_management("'';'';'';'';'';'';'';'';'';''", Merge, "")
# Process: Dissolve
arcpy.Dissolve_management(Merge, Dissolve, "", "", "SINGLE_PART", "DISSOLVE_LINES")

Outcomes