Create Territory Solution (Territory Design)
Summary
Tool creates a new Territory Solution with one empty territory level.
Usage
-
Polygon and Point layers can be used as Alignment Layer for new Territory Solution.
One of String, Integer, SmallInteger, Double, Single, Date, OID, GlobalID, GUID field of Alignment Layer can be used as Display Field. Default value is Alignment Layer’s display field. If Alignment Layer’s display field is not defined first suitable field will be applied.
Default Territory Level Name will be read from ATDConfig.xml if not specified.
Territory Solution Location is a path to "Territories" folder in a current project of BA by default.
Default Territory Solution Name is generated if not specified.
Syntax
Parameter | Explanation | Data Type |
in_alignment_layer |
Alignment Layer for new Territory Solution | Feature Layer |
in_display_field (Optional) |
Display Field for Territory Solution | Field |
in_level_name (Optional) |
Name of first territory level | String |
in_territory_solution_location (Optional) |
Location of Territory Solution | String |
in_territory_solution_name (Optional) |
Name of Territory Solution | String |
Code Sample
The following Python window script demonstrates how to use the tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.CreateTerritorySolution_TD("esri_zip5", "NAME", "Territories", "C:/BA Output/Project/Default Project/Territories/", "new layer")
The following stand-alone script demonstrates how to use the tool.
# Import system modules
import arcgisscripting
gp = arcgisscripting.create()
# Set local variables
alignmentLayer = "esri_zip5"
displayField = "NAME"
levelName = "Territories"
solutionLocation = "C:/BA Output/Project/Default Project/Territories/"
solutionName = "new layer"
# Execute tool
gp.CreateTerritorySolution_TD(alignmentLayer, displayField, levelName, solutionLocation, solutionName)