1 of 1 people found this helpful
I looked over the PCB Automation Reference and found that 'Add Method' is not mentioned for LayerRanges Collection, whereas it is addressed in most other collections. It might make sense that LayerRanges Collection does not allow adding a new entry, but then for what Utility.NewLayerRanges method is, that is to create a new, empty LayerRanges collection if the collection cannot get a new entry?
It appears that removing unnecessary elements in LayerRangesCol above could make a workaround.
I succeed using "remove" method as per your comment. Thank you!