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 ...
I accidentally deauthorized my licenses. The individual software licenses are now "Disabled" - how do I re-authorize them?
ArcGIS doesn't open, showing "XML Parser Initialization Failed"
How do I authorize Spatial Analyst Licens
&quot;Method failed.HRESULT = 0x80070057 : The parameter is incorrect&quot; in AGS 10.1 log
Unexpected story map behavior- desktop vs mobile