Click or drag to resize

PageViewGroupTableItem Property

Conceptually, the page view group table is an array of page view groups. The operator[] can be used to get individual page view group. A page view group is either active or deleted and this state is reported by PageViewGroup.IsDeleted.

Namespace:  Rhino.DocObjects.Tables
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public PageViewGroup this[
	int index
] { get; }

Parameters

index
Type: SystemInt32
Zero-based array index.

Return Value

Type: PageViewGroup
Reference to the page view group. Note, this reference may become invalid after Add() is called.
Exceptions
ExceptionCondition
IndexOutOfRangeException
Remarks

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.

See Also