MBS ChartDirector Hide Layer/Line

Hi all, I have a chart with several layers of line data from different sources and different ranges that I want to hide by index using some checkbox filters I made. I see that CDLineLayer and CDLayer let you select a layer and do things like SetLineWidth, but seems like only for newly drawn layers. Is that so, the only way to hide a layer is to redraw or am I missing something? Thanks!

Some of what I tried follows:

Dim c As New CDXYChartMBS 
c = self.trackLineLegend1.c

dim layer As CDLayerMBS

Dim nLayers As Integer = c.GetLayerCount

if index = 0 Then 
  
  If uncertaintyCheckbox(0).Value = False Then //unchecked,  Hide +/- 1 std dev
    
    layer = c.getLayer(nLayers - 3)
    layer.setLineWidth(0)
    
    layer = c.getLayerByZ(nLayers - 2)
    layer.setLineWidth(0)
    
    
  Else //checked, show +/- 1 std dev
    
  End 

Else if index = 1 .... 


End


trackLineLegend1.Backdrop = c.makeChartPicture

//add c to property to manipulate later
trackLineLegend1.c = c

Well, as you create new chart each time, you can decide what to include and only add the layers you need.
Or do I miss something?

PS: Please move thread to add-on section.