Friday 24 May 2019

arcgis 10.0 - Remove Layer Labels


public void LabelOff( IActiveView view, IGeoFeatureLayer geoFeatureLayer ) {
IAnnotateLayerPropertiesCollection annotationProperties =
geoFeatureLayer.AnnotationProperties;
annotationProperties.Clear();
geoFeatureLayer.DisplayAnnotation = false;
// Which one?
view.PartialRefresh( esriViewDrawPhase.esriViewGraphics,
geoFeatureLayer, null );

view.Refresh();
}

I use this code to remove labels for one specific layer. It only works with the view.Refresh(). Shouldn't the PartialRefresh() also work (without calling the view.Refresh()?)




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...