You can do this by creating a temporary feature for the template then get its symbol from the renderer. If the symbol is null then you have the the 'symbol will not draw' case. //get the template symbol IFeatureClass featClass = featLayer.FeatureClass; IFeatureBuffer featBuffer = featClass.CreateFeatureBuffer(); IFeature feature = featBuffer as IFeature; editTemplate.SetDefaultValues(feature); IGeoFeatureLayer geoFeatLayer = featLayer as IGeoFeatureLayer; ISymbol symbol = geoFeatLayer.Renderer.get_SymbolByFeature(feature);
//get the template symbol IFeatureClass featClass = featLayer.FeatureClass; IFeatureBuffer featBuffer = featClass.CreateFeatureBuffer(); IFeature feature = featBuffer as IFeature; editTemplate.SetDefaultValues(feature); IGeoFeatureLayer geoFeatLayer = featLayer as IGeoFeatureLayer; ISymbol symbol = geoFeatLayer.Renderer.get_SymbolByFeature(feature);
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.