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 ...
ArcGIS Desktop 10.4 - The search window has disappeared
ArcMap Search Window Missing
Update Source Option for Services Hosted in ArcGIS Online & Portal
FIX YOUR TRACE TOOL!!
Resetting your ArcGIS application profile