I have create a script and want to add it to the model I have provided. The code is:
import sys, string, os import arcpy import numpy Table = arcpy.GetParameterAsText(0) Field1 = arcpy.GetParameterAsText(1) Field2 = arcpy.GetParameterAsText(2) arr = arcpy.da.TableToNumPyArray(Table, Field1) arcpy.AddField_management(Table, Field2 , "DOUBLE") arcpy.CalculateField_management(Table,Field2,(numpy.mean(arr[Field1]))) out = arcpy.SetParameterAsText(4, Table)
However I want to select a field of a feature and calculate the mean value of that field and with the result of the mean continue the rest of the analysis in the model. I have create 3 Parameters, that 1th is a table and the input field and output field. However, when I import the script tool in the model , there is no output feature that I could link it to the rest of the model. How can I do that?