The Esri Community
Services & Programs
GeoNet Resource Hub
to create and rate content, and to follow, bookmark, and share content with other members.
Replicate Import Symbology Matching Dialog in ArcObjects?
Discussion created by
on May 31, 2013
on Jun 3, 2013 by slvsfr
Show 0 Likes
In Arcmap I can render a layer with same symbolgy applied to different fields by way of re-importing the .lyr file and choosing a Value Field. How can replicate the functionality in ArcObjects?
This content has been marked as final.
Show 1 comment
(Required, will not be published)
Jun 3, 2013 4:27 AM
Given an IFeatureLayer, "theLayer", one would cast to a IGeoFeatureLayer, then get its IFeatureRenderer and cast that to a IClassBreaksRenderer. Then it is a s imple matter to set the IClassBreaksRenderer's Field to the field to be rendered.
IGeoFeatureLayer lyr = theLayer as IGeoFeatureLayer;
IFeatureRenderer ifr = lyr.Renderer;
IClassBreaksRenderer cbr = ifr as IClassBreaksRenderer;
cbr.Field = "someFieldName";
Show 0 Likes
Retrieving data ...
Understanding Survey123's custom URL Scheme
Survey123 & Signatures After Sending a Survey
Creating PictureMarkerSymbols with raw SVG tags or with Dojo GFX
2 Qs - 1 Modify Submit Button, & 2 Auto-Submit Survey
Portal For ArcGIS - Collector URL?