I am trying to set only the copper layer visible in my kicad file. I use the following code, then export the footprints and convert them to svg. When I look at the svg file, it looks like all of the layers are still turned on. How can I fix the code?
f_cu_layer_id = board.GetLayerID("F.Cu")
lset = pcbnew.LSET()
lset.addLayer(f_cu_layer_id)
board.SetVisibleLayers(lset)
After I set the visible layers, I also ran the below code and it showed that the board only had the F.Cu layer visible (layer 0). However, the layers are still visible in the GUI.
lset2 = board.GetVisibleLayers()
lset2.Contains(1) #substitute for any other layer id