Import Variables by Attribute Join (Territory Design)
Summary
Tool allows joining external variables to the Territory Solution by attribute intersection.
Usage
-
One of String, Integer, SmallInteger, Double, Single, Date, OID field of Alignment Layer can be used as in_field_territories.
One of String, Integer, SmallInteger, Double, Single, Date field of importing table can be used as in_field_table.
One or more of Integer, SmallInteger, Double, Single field of importing table can be used as in_variables.
Syntax
Parameter | Explanation | Data Type |
in_territory_solution_layer |
Territory Solution layer to import variables to | GP TD Layer |
in_table |
Source table to import variables from | Table |
in_field_territories |
Join field from Alignment Layer | Field |
in_field_table |
Join field from the import table | Field |
in_variables [in_variables,...] |
Set of fields to import from the input table | Field |
Code Sample
The following Python window script demonstrates how to use the tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.ImportVariablesByAttributeJoin_TD("new layer", "C:/database.lyr", "ID", "ID", "AREA;TOTPOP_CY")
The following stand-alone script demonstrates how to use the tool.
# Import system modules
import arcgisscripting
gp = arcgisscripting.create()
# Set local variables
solution = "new layer"
table = "C:/database.lyr"
joinFieldAlignmentLayer = "ID"
joinFieldTable = "ID"
variables = "AREA;TOTPOP_CY"
# Execute tool
gp.ImportVariablesByAttributeJoin_TD(solution, table, joinFieldAlignmentLayer, joinFieldTable, variables)