ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Import Territory Solution

Available with Business Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a new Territory Solution based on an existing Solution and a new Alignment Layer.

The new Solution will contain territory hierarchy, variables, constraints, and other options from the base Territory Solution.

Usage

  • Any Polygon or Point layer can be used as an Alignment Layer for the new Territory Solution.

  • A String, Integer, SmallInteger, Double, Single, Date, OID, GlobalID, GUID field of Alignment Layer can be used as a Display Field. The default value is the Alignment Layer’s display field. If the Alignment Layer’s display field is not defined the first suitable field will be applied.

  • By default, the Territory Solution Location is under the "Territories" folder in the current BA project.

  • A Default Territory Solution Name is generated, if not specified.

Syntax

arcpy.td.ImportTerritorySolution_TD(in_territory_solution_layer, in_alignment_layer, {in_display_field}, {in_territory_solution_location}, {in_territory_solution_name})
ParameterExplanationData Type
in_territory_solution_layer

The Territory Solution layer from which to import.

GP TD Layer
in_alignment_layer

The Alignment Layer for the new Territory Solution.

Feature Layer
in_display_field
(Optional)

The Display Field for the Territory Solution.

Field
in_territory_solution_location
(Optional)

The Location of the Territory Solution.

String
in_territory_solution_name
(Optional)

The name of the Territory Solution.

String

Code sample

ImportTerritorySolution_TD example (Python window)

The following Python window script demonstrates how to use the tool in immediate mode.

import arcgisscripting
gp = arcgisscripting.create()
gp.ImportTerritorySolution_TD("new layer", "ZIPCodes_zp", "NAME", "C:/BA Output/Project/Default Project/Territories/", "new layer2")
ImportTerritorySolution_TD example 2 (stand-alone script)

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"
alignmentLayer = "ZIPCodes_zp"
displayField = "NAME"
solutionLocation = "C:/BA Output/Project/Default Project/Territories/"
solutionName = "new layer2"

# Execute tool
gp.ImportTerritorySolution_TD(solution, alignmentLayer, displayField, solutionLocation, solutionName)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics

  • An Overview of the Create Territory Solution Toolset
  • Delete Territory Solution
  • Build Territory Index
  • Create Territory Solution

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal