SetIcon()

Summary

Sets the font and character or bitmap used to draw point features.

Syntax

SetIcon(string lyr_set_name, string icon_type, string name, real size_or_index)

Argument Contents
lyr_set_name The name of the layer or selection set
icon_type A string indicating the type of icon: "Font Character" or "Color Bitmap"
name The name of a TrueType font (including size and style), or the name of the bitmap file
size_or_index Index of a character in the font, or size of the bitmap in points

Notes

  • When used on a selection set, a null value for icon_type, font_name, or icon_index indicates that the default value for the layer should be used.

  • If lyr_set_name is null, SetIcon() operates on the current layer.

  • SetIcon() normally operates on the current map. You can force it to operate on a different map by including the map name in lyr_set_name. For instance, "Map1|LayerA|" affects the display of LayerA in Map1.

Example

SetIcon("Cities|", "Font Character", "Arial|16", 44)
SetIcon("Cities|Capitals", "Font Character", "Arial|Bold|24", 48)
SetIcon("Cities|Large", "Color Bitmap", "c:\\temp\\large.bmp", 16)

Error Codes

Error Type Meaning
NotFound The layer or selection set does not exist

See Also

Function Summary
GetIcon() Gets the font and character or bitmap used to draw point features
SetIconColor() Sets the color used to draw point features
SetIconSize() Sets the point size of symbols used to draw point features