Reply to: Read-only PIOctober 6, 2015 at 9:46 pm
If you remove rng.SelectElement() I think you will have something closer to what you want. At the moment your code is affecting the PI's container, not the PI itself.
However, you will also need to change rng.ReadOnly to rng.ReadOnlyContainer because ReadOnly is a read-only property and cannot be set.
But perhaps you want to stop people from removing the PIs? In that case you would use rng.NonRemovableContainer instead.