PageViewGroupTableItem Property |
Namespace: Rhino.DocObjects.Tables
| Exception | Condition |
|---|---|
| IndexOutOfRangeException |
Detaching a worksession reference model, or purging a linked instance definition, removes its page view groups but leaves the table slots they occupied empty. The slots cannot be closed up, because table indices are persistent references that objects store. Count spans the empty slots, and they accumulate for the life of the document - one per purge.
An index that lands on an empty slot returns a PageViewGroup that throws DocumentCollectedException on every property access, so code that walks this table by index must expect it. To tell a real page view group from an empty slot, compare the index you asked for with PageViewGroup.Index: an empty slot never reports the index you asked for. Enumerating the table with foreach goes through the document manifest rather than the raw table array, so it does not visit empty slots at all and is the safer way to walk the table. See RH-97389.