Preguntas frecuentes

En una capa de entidades, ¿pueden las etiquetas para diferentes entidades tener colores diferentes?

Last Published: October 1, 2025

Respuesta

To create labels for different features have different colors in a feature class, it is necessary to create label classes. This can be done using the ESRI.ArcGIS.Carto.IAnnotateLayerProperties interface, as shown in the following example:
Pseudo Code Example:

IAnnotateLayerProperties.Class = "Class1" // Create one or more classes to represent each label color
IAnnotateLayerProperties.WhereClause = "Pop2000 > 4000" // Criteria for selecting the features to label with this color
Cast IAnnotateLayerProperties to ILabelEngineLayerProperties to set Symbol properties for the label
ILabelEngineLayerProperties.Symbol gives an ITextSymbol, which has a Color property. Use this to change the color
ILabelEngineLayerProperties.Expression = " \"State Name: \"[STATENAME] " // Actual label content

Id. de artículo: 000016570

Obtenga soporte con IA

Resuelva su problema rápidamente con el chatbot de inteligencia artificial de soporte de Esri.

Empieza a chatear ahora

Información relacionada

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Empieza a chatear ahora

Ir a opciones de descarga