GetManualLabelOptions()
Summary
Get the manual label settings for a layer.
Changes
In Version 6.0/2012 is still available but will now do nothing if called.
Syntax
options = GetManualLabelOptions(string lyr_name)
| Argument | Contents |
|---|---|
| lyr_name | The name of the layer, or null for the current layer |
Returns
An array of option pairs.
| Option | Type | Contents |
|---|---|---|
| Expression | String | The field name, or expression, whose result is used as the label |
| Font | String | Font name, size and style |
| Format | String | Format to use when labeling a numeric field |
| Alignment | String | Desired label position relative to the feature, expressed as a compass direction ("NW', 'N", "NE", "W", "C", "E," "SW", "S", "SE") |
| Rotation | Boolean | Whether line labels should be rotated to align with the line feature |
| Color | Color | Label color |
| Framed | Boolean | Whether frames should be displayed around each label |
| Frame Border Style | Linestyle | Style of the frame border |
| Frame Border Color | Color | Color of the frame border |
| Frame Border Width | Real | Width of the frame in points |
| Frame Fill Color | Color | Color of the interior of the frame |
| Frame Fill Style | Fillstyle | Style used for the interior of the frame |
| Frame Shield | Array | The highway shield definition (string font_name, array of (integer index, color)) |
| Frame Type | String | Shape of the frame ("ellipse", "rectangle", "rounded rectangle", or "shield") |
Notes
-
The returned font is the font used to display a manual label at the current map scale. If the scale has changed since SetManualLabels() was called, the font size is different.
-
The frame options are only present only if the Framed option is "True."
-
The order of the options may change in the future, so use the name of an option instead of its position in order to locate it.
Error Codes
| Error Type | Meaning |
|---|---|
| Error | There is no layer with the given name |
See Also
| Function | Summary |
|---|---|
| SetManualLabels() | Changes the manual label settings for a layer |
| AddAnnotation() | Adds an annotation to a map or layout window |
| GetLabelExpression() | Gets the label expression for a layer or selection set |
| GetLabelOptions() | Gets the label option settings for a layer or selection set |