Solved! Go to Solution.
# Option 1 - Get feature class from tool parameter arg1 = arcpy.GetParameterAsText(0) # Define static parameters ARG2 = "ABC" ARG3 = "123" ARG4 = "456" ARG5 = "#" ARG6 = "XYZ" ARG7 = "#" # Process parameters into command line if ARG2 != "#": command.append("-o") command.append('"'+ARG2+'"')
# Option 2 - Get all variables from tool parameters arg1 = arcpy.GetParameterAsText(0) arg2 = arcpy.GetParameterAsText(1) arg3 = arcpy.GetParameterAsText(2) arg4 = arcpy.GetParameterAsText(3) arg5 = arcpy.GetParameterAsText(4) arg6 = arcpy.GetParameterAsText(5) arg7 = arcpy.GetParameterAsText(6) # Process parameters into command line if arg2 != "#": command.append("-o") command.append('"'+arg2+'"')
# Option 1 - Get feature class from tool parameter arg1 = arcpy.GetParameterAsText(0) # Define static parameters ARG2 = "ABC" ARG3 = "123" ARG4 = "456" ARG5 = "#" ARG6 = "XYZ" ARG7 = "#" # Process parameters into command line if ARG2 != "#": command.append("-o") command.append('"'+ARG2+'"')
# Option 2 - Get all variables from tool parameters arg1 = arcpy.GetParameterAsText(0) arg2 = arcpy.GetParameterAsText(1) arg3 = arcpy.GetParameterAsText(2) arg4 = arcpy.GetParameterAsText(3) arg5 = arcpy.GetParameterAsText(4) arg6 = arcpy.GetParameterAsText(5) arg7 = arcpy.GetParameterAsText(6) # Process parameters into command line if arg2 != "#": command.append("-o") command.append('"'+arg2+'"')
# define you exe path exe_path = r"C:\temp\YourApp.exe" # start iteration within folder on featureclasses for fc in folder: cmd = '"{0}" "{1}" "arg2" "arg3" "arg4" "arg5" "arg6" "arg7"'.format(exe_path, fc) # run your cmd