AssignShapeToTerritory

 

The AssignShapeToTerritory method assigns the selected boundary object to a territory map territory.

 

Syntax

object.AssignShapeToTerritory

object.AssignShapeToTerritory( TerritoryIndex, PIDNameOfShape )

 

Parameter

Type

Description

TerritoryIndex

Integer

required; territory number, the first territory is 1

PIDNameOfShape

String

required; PID of boundary object

 

Example

    'AssignShapeToTerritory & NumTerritories & InterpolateTerritoryFills

    'Create five territories in the map

    TerritoryMap.NumTerritories = 5

 

    'Fill all the territories based on the default color scale

    TerritoryMap.InterpolateTerritoryFills

 

    'Assign the boundary with PID "08021" to the second territory

    TerritoryMap.AssignShapeToTerritory(TerritoryIndex:=2, PIDNameOfShape:="08021")

 

    'Assign the boundary with the PID "08001" to the fourth territory

    TerritoryMap.AssignShapeToTerritory(TerritoryIndex:=4, PIDNameOfShape:="08001")

 

Used by: TerritoryMap object