ccposton

Label Only Selected Features?

Discussion created by ccposton on Dec 15, 2011
Latest reply on Jan 9, 2012 by ccposton
OK, I've been labeling using the LabelEngine and simple expressions and it is working for every layer. I want to offer the option of labeling only selected features and thought it would be this simple:

annotateLayerProperties.LabelWhichFeatures = esriLabelWhichFeatures.esriSelectedFeatures;


Unfortunately that doesn't do it. Every polygon is still labeled. I verified that the features were selected (I have a routine that just returns the selected keys.) I also tried replacing the Engine labeling with a:

annotateLayerProperties.WhereClause = BuildWhere( keyName, selected ); 


using both my keys and the features OIDs - that does not label at all.

Does anyone know how to label only the selected features?

Outcomes