Python Toolbox: Validating derived parameters for Model Builder

المشرف العام

Administrator
طاقم الإدارة
I'm working on a tool in a Python toolbox and I'm running into trouble getting the output tables to work in Model Builder.

The tool takes an input table view and ultimately uses the Table Select (Analysis) tool to save two new tables based on different SQL queries into the geodatabase. I thought setting the Parameter Dependencies to the input table would be a good start, but that just set the output tables to updated versions of the input, not two new tables.

How do validate Output table 2 and 3 so that they show up as two new tables in Model Builder but have all the fields of the input table?

def getParameterInfo(self): """Define parameter definitions""" workspace = arcpy.Parameter( displayName = "Geodatabase", name = "gdb", datatype = "DEWorkspace", parameterType = "Required", direction = "Input") workspace.defaultEnvironmentName = "workspace" # Input Table param1 = arcpy.Parameter( displayName = "Input Feature", name = "in_feature", datatype = "GPTableView", parameterType = "Required", direction = "Input" ) # Output Table 1 param7 = arcpy.Parameter( displayName = "GEOCODE Table", name = "geocode_table", datatype = "DETable", parameterType = "Derived", direction = "Output") # Output Table 2 param8 = arcpy.Parameter( displayName = "FLAGGED Table", name = "flagged_table", datatype = "DETable", parameterType = "Derived", direction = "Output")

أكثر...
 
أعلى