Is this a bug in the DraftSight API?
I am writing an add-in for editing layer states.
I want to change a layer state programmatically to show certain hidden layers.
Here is some example code which does NOT work, but I can't understand why:
---------------------
dsDoc = dsApp.GetActiveDocument() 'Works OK
Dim dsLayerStatMgr As LayerStateManager = dsDoc.GetLayerStateManager() 'Works OK
Dim dsLayState As LayerState = dsLayerStatMgr.GetLayerState("state1") 'Works OK
Dim dsLayerProp As LayerProperties = dsLayState.GetLayerProperties("layer1") 'Works OK
dsLayerProp.Show = True
dsLayState.Activate() 'This should show the layer, but it does not
---------------------
The line "dsLayerProp.Show = True " does set the .show property in the dsLayerProp object correctly, but the layer state in the drawing is not changed.
API documentation says that LayerProperties objects can both read and write properties, but I am only able to read. It seems writing to LayerProperty objects does not propagate the properties to the actual layer state.
