I'm trying to figure out how to discover if the symbol class from a simple renderer is CartographicLineSymbol in vb.NET
According to the documentation ISimpleRenderer.Symbol returns ISymbol.
According to the documentation ISymbol implements several line symbol classes (CartographicLineSymbol, HashLineSymbol, etc.)
I set layer's symbol "Type" to "Cartographic Line Symbol" in the properties and yet this code is not working:
Dim rendLinks As ISimpleRenderer = geoLyrLinks.Renderer Dim aSymbol As ISymbol = rendLinks.Symbol If TypeOf aSymbol Is ICartographicLineSymbol Then MessageBox.Show("i'm a cartographiclinesymbol") Else MessageBox.Show("NOT a cartographiclinesymbol") End If
Can someone tell me what I'm doing wrong? Or can someone tell me how to simply retrieve the symbol class from a simple renderer?
Thank you so much. I just happened to stumble on a similar thread that was pointing me in this direction, but your tip got me there faster.
I just tested this - it seems that when changing the line symbol through ArcMap (Symbol Selector>Edit Symbol>Symbol Property Editor) and selecting Cartographic Line Symbol the new symbol is a IMultiLayerLineSymbol.
Now I just need to figure out how to loop thru the layers.