Available with Advanced license.
Summary
Creates label points for polygons that have no labels and assigns each a User-ID.
Illustration
Usage
After Create Labels, the polygon User-IDs stored in the Input Coverage PAT are not equal to the new label point User-IDs generated by Create Labels. You must use Build or Update IDs to make them equal.
The ID Base value provides the starting point for creating the label point User-IDs. The specified value will be the User-ID for the first polygon encountered that has no label point. User-IDs are then incremented by one for each subsequent polygon having no label point. Specifying a value of zero will create new labels for all polygons, where each User-ID will equal the polygon's internal number minus one.
The Input Coverage must contain polygon topology.
If the specified ID Base value is negative, all new User-IDs will start with the specified value and be decremented by one for each new label point. Negative ID values will not be generated.
If a coverage contains polygons and only some of the polygons have label points, Create Labels will only generate labels in those polygons for which no labels exist if you specify an ID Base.
The coordinate precision of the coverage is not changed by Create Labels.
Syntax
arcpy.arc.CreateLabels(in_cover, {id_base})
Parameter | Explanation | Data Type |
in_cover | The coverage to which label points are to be added. | Coverage |
id_base (Optional) | The minimum User-ID value to be assigned to new label points. The specified value will be the User-ID for the first polygon encountered that has no label point. User-IDs are then incremented by one for each subsequent polygon having no label point. Specifying an ID Base of zero will create new labels for all polygons, where each User-ID will equal the polygon's internal number minus one. This is the default value. | Long |
Code sample
CreateLabels example (stand-alone script)
The following stand-alone script demonstrates how to create labels in a polygon coverage.
# Name: CreateLabels_Example.py
# Description: Creates labels in a polygon coverage
# Requirements: ArcInfo Workstation
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inCover = "texas"
idBase = 0
# Execute CreateLabels
arcpy.CreateLabels_arc(inCover, idBase)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcInfo Workstation installed