AnsweredAssumed Answered

Discover renderer line symbol type

Question asked by rockley on Apr 25, 2014
Latest reply on Apr 25, 2014 by rockley
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?

Outcomes