Original User: maxh718I am creating a tool using Python, the output of the tool is a feature class.then I want to use the field name as the value of the dropdown list of the field selection to select a field as the the buffer size, but the problem is I can not see the field names.Did I miss something?def main():
inFC=arcpy.GetParameterAsText(0)
outFC=arcpy.GetParameterAsText(1)
# outFC=createUniqueOutputName(inFC)
distance=arcpy.GetParameterAsText(2)
arcpy.AddMessage("split %s into %s by %s"%(inFC,outFC,distance))
#arcpy.AddMessage("%s--- %s "%(env.workspace,env.scratchWorkspace))
if arcpy.Exists(outFC):
print "%s is deleted"%outFC
arcpy.Delete_management(outFC)
## create outFC
out_path = os.path.dirname(outFC)
arcpy.AddMessage(out_path)
out_name = os.path.basename(outFC)
arcpy.AddMessage(out_name)
geometry_type = "POLYLINE"
template=inFC
arcpy.CreateFeatureclass_management(out_path, out_name, geometry_type,template)
arcpy.AddMessage("before splitting")
splitLineByDistance(inFC,outFC,200)
if __name__ == '__main__':
main()