Load Territory Records (Territory Design)

获得 Business Analyst 许可后可用。

摘要

Adds records (features) or updates existing records for the specified level.

使用情况

  • The tool specifies an existing territory solution.

  • The tool specifies the level where records will be added.

  • A point layer will add records to the Territories Centers layer.

  • A polygon layer will add records to the Territories Boundary layer.

  • The tool requires a feature layer or table for input.

参数

标注说明数据类型
Input Territory Solution

The name of the input territory solution.

Group Layer; Feature Dataset; String
Level

The name of the level to which the data will be loaded.

String
Input Data

The layer or records to be loaded.

Table View
ID Field
(可选)

The field containing the ID values to be loaded into the level.

Field
Name Field
(可选)

The field containing the name values to be loaded into the level.

Field
Field Map
(可选)

The values that will be used for the territory properties.

  • Parent Territory ID—The ID of the parent territory.
  • Locked State—The territory can't be modified.
  • Center Locked—Center points can't be modified and will remain in their fixed locations.

Value Table
Append Data
(可选)

Specifies whether the records being loaded will be appended or replaced.

  • Checked—The records being loaded to the specified level will be appended.
  • Unchecked—The records being loaded to the specified level will be replaced. This is the default.
Boolean

派生输出

标注说明数据类型
Updated Territory Solution

The updated territory solution.

Group Layer

arcpy.td.LoadTerritoryRecords(in_territory_solution, level, in_data, {id_field}, {name_field}, {field_map}, {append_data})
名称说明数据类型
in_territory_solution

The name of the input territory solution.

Group Layer; Feature Dataset; String
level

The name of the level to which the data will be loaded.

String
in_data

The layer or records to be loaded.

Table View
id_field
(可选)

The field containing the ID values to be loaded into the level.

Field
name_field
(可选)

The field containing the name values to be loaded into the level.

Field
field_map
[[attribute, field],...]
(可选)

The values for the territory properties.

  • parent_territory_id—The ID of the parent territory.
  • locked_state—The territory can't be modified.
  • center_locked—Center points can't be modified and will remain in their fixed locations.

Value Table
append_data
(可选)

Specifies whether the records being loaded will be appended or replaced.

  • APPENDThe records being loaded to the specified level will be appended.
  • REPLACEThe records being loaded to the specified level will be replaced. This is the default.
Boolean

派生输出

名称说明数据类型
out_territory_solution

The updated territory solution.

Group Layer

代码示例

LoadTerritoryRecords example (Python window)

The following Python window script demonstrates how to use the LoadTerritoryRecords function.

import arcpy
arcpy.td.LoadTerritoryRecords("Territory Solution", "Level[1]", r"C:\Temp \sampledata.gdb\StoreLocations", "ID", "Name", None, "REPLACE")

环境

特殊情况

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题