Available with Business Analyst license.
Summary
Exports Territories to Business Analyst Trade Areas.
Exporting Territories allows Business Analyst to read the territory polygons within the Trade Area wizard.
Usage
Only Territory Solutions with a BDS Alignment Layer are valid.
The Territory Name format is as follows: Territory_Name[Territory_OID].
The Territory Level format is as follows: Level_Name[Level_Index].
The Territory Level can be an Alignment Layer (use full-qualified name of Alignment Layer in this case).
Creating a Trade Area format depends on the value specified in the Business Analyst settings (see "BA Preferences / Data / Output Data Format").
Syntax
arcpy.td.ExportTerritoriesToTradeAreas(in_territory_solution_layer, in_level, in_export_territory, in_ta_location, in_ta_name)
Parameter | Explanation | Data Type |
in_territory_solution_layer | The Territory Solution layer that is to be exported. | GP TD Layer |
in_level | The Territory Level to export. | String |
in_export_territory | The name of the territory to export (in specified format) or the keyword to export all territories from a specified level.
| String |
in_ta_location | The location of the Trade Area. | Folder |
in_ta_name | The name of the Trade Area. | String |
Code sample
The following Python window script demonstrates how to use Business Analyst geoprocessing tool in immediate mode.
import arcgisscripting
gp = arcgisscripting.create()
gp.ExportTerritoriesToTradeAreas_TD("new layer", "Territories[1]", "ALL_TERRITORIES_FROM_LEVEL", "C:/BA Output/Projects/Default Project/TradeAreas/", "New Trade Area")
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"
level = "Territories[1]"
territory = "ALL_TERRITORIES_FROM_LEVEL"
location = "C:/BA Output/Projects/Default Project/TradeAreas/"
name = "New Trade Area"
# Execute tool
gp.ExportTerritoriesToTradeAreas_td(solution, level, territory, location, name)
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Requires Business Analyst
- Standard: Requires Business Analyst
- Advanced: Requires Business Analyst