Import Territory Solution (Territory Design)

Доступно с лицензией Business Analyst.


Creates a new territory solution and imports the territories hierarchy from a table or a layer.


  • The input data should have a hierarchical structure.

  • Specifying more than a single level will create a hierarchy.


ImportTerritorySolution(in_data, solution_name, level_settings)
ParameterОбъяснениеТип данных

The layer or records to be imported.

Table View

The name of the territory solution to be created.

[[level_name, territory_name_template, id_field, name_field, parent_id_field, primary_feature_class],...]

The level settings for importing the territories hierarchy.

  • level_name—The name of the level (required).
  • default_territory_name—The prefix for the new territories that will, subsequently, be created at the level (optional).
  • id_field—The field that contains IDs (unique IDs) for territories (required).
  • name_field—The field that contains names for territories (optional).
  • parent_id_field—The field that contains IDs of parent territories (optional).
  • primary_feature_class—Specifies the class level that will be used for storing level attributes (optional).
    • TERRITORY_BOUNDARIES—Level attributes will be stored using the boundaries of the territory solution.
    • TERRITORY_CENTERS—Level attributes will be stored using the boundary centers of the territory solution.
    • BASE_BOUNDARIES—Level attributes will be stored using the boundaries of the base layer.
    • BASE_CENTERS—Level attributes will be stored using the boundary centers of the base layer.
Value Table

Производные выходные данные

NameОбъяснениеТип данных

The updated territory solution.

Group Layer

Пример кода

ImportTerritorySolution example (Python window)

The following Python window script demonstrates how to use the ImportTerritorySolution tool.

import arcpy"zips", "Territory Solution", "Base BaseName ID NAME TerritoryID BASE_BOUNDARIES;Territories Territory TerritoryID # # TERRITORY_BOUNDARIES")

Информация о лицензиях

  • Basic: Требуется Business Analyst
  • Standard: Требуется Business Analyst
  • Advanced: Требуется Business Analyst

Связанные разделы