PageView group table

Properties

ActiveCount

#Since v9.0
public int ActiveCount { get; }
Returns number of page view groups in the table, excluding deleted page view groups.

ComponentType

#Since v9.0
public override ModelComponentType ComponentType { get; }

Count

#Since v9.0
public override int Count { get; }
Returns number of page view groups in the table, including deleted page view groups.

Document

#Since v9.0
public RhinoDoc Document { get; }
Document that owns this table.

Indexers

this[]

#Since v9.0
public PageViewGroup this[int index] { get; }
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.
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.

index (int)Zero-based array index.
Reference to the page view group. Note, this reference may become invalid after Add() is called.

Methods

Add

#Since v9.0
public int Add()
Adds a new page view group to the table. The new page view group will be given a unique name.
Index of new page view group if successful, -1 otherwise.

Add

#Since v9.0
public int Add(IEnumerable<RhinoPageView> groupMembers)
Adds a new page view group to the table, and adds page views to the group. The new page view group will be given a unique name.
groupMembers (IEnumerable<RhinoPageView>)An enumeration of page views.
Index of new page view group if successful, -1 otherwise.

Add

#Since v9.0
public int Add(PageViewGroup group, IEnumerable<RhinoPageView> groupMembers)
Adds a new page view group to the table, and adds page views to the group.
group (PageViewGroup)The page view group to add. The information in the page view group is copied. If group.Name is empty a unique name will be used.
groupMembers (IEnumerable<RhinoPageView>)An enumeration of page views.
Index of new page view group if successful, -1 otherwise.

Add

#Since v9.0
public int Add(PageViewGroup group)
Adds a new page view group to the table.
group (PageViewGroup)The page view group to add. The information in the page view group is copied. If group.Name is empty a unique name will be used.
Index of new page view group if successful, -1 otherwise.

Clear

public void Clear()
Marks all items as deleted.
inherited fromCommonComponentTable<T>

Delete

#Since v9.0
public bool Delete(Guid id, bool quiet)
Deletes a page view group.
id (Guid)Id of page view group.
quiet (bool)true to disable any warning or error messages.
true if successful, false otherwise.

Delete

#Since v9.0
public bool Delete(int index, bool quiet)
Deletes a page view group.
index (int)Zero-based index of page view group.
quiet (bool)true to disable any warning or error messages.
true if successful, false otherwise.

Delete

#Since v9.0
public bool Delete(PageViewGroup group, bool quiet)
Deletes a page view group.
group (PageViewGroup)PageViewGroup to delete.
quiet (bool)true to disable any warning or error messages.
true if successful, false otherwise.

Delete

#Since v9.0
public override bool Delete(PageViewGroup group)
Deletes a page view group.
group (PageViewGroup)PageViewGroup to delete.

FindId

public virtual T FindId(Guid id)
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
inherited fromCommonComponentTable<T>
id (Guid)ID of model component to search for.
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

#Since v9.0
public PageViewGroup FindIndex(int index)
Finds a page view group given its index.
index (int)Zero-based page view group index.
An page view group, or null if not found or on error.

FindName

#Since v9.0
public PageViewGroup FindName(string name)
Finds a page view group given its name.
name (string)The name of the page view group.
An page view group, or null if not found or on error.

FindNameHash

#Since v9.0
public PageViewGroup FindNameHash(NameHash nameHash)
Finds a page view group given its name hash.
nameHash (NameHash)The name hash of the page view group.
An page view group, or null if not found or on error.

GetEnumerator

#Since v9.0
public override IEnumerator<PageViewGroup> GetEnumerator()

GetSorted

#Since v9.0
public int[] GetSorted()
Gets an array of page view group indices that are sorted by the values of PageViewGroup.SortIndex.
An array of page view indices.

GetUnusedName

#Since v9.0
public string GetUnusedName()
Gets an unused page view group name.
An unused page view group name

GetUnusedName

#Since v9.0
public string GetUnusedName(string rootName)
Gets an unused page view group name.
rootName (string)The name's root or prefix.
An unused page view group name

Modify

#Since v9.0
public bool Modify(PageViewGroup newSettings, Guid id, bool quiet)
Modifies a page view group.
newSettings (PageViewGroup)The modified page view group.
id (Guid)Id of page view group to modify.
quiet (bool)
>true if successful, false otherwise.
ArgumentNullExceptionIf newSetting is null.

Modify

#Since v9.0
public bool Modify(PageViewGroup newSettings, int index, bool quiet)
Modifies a page view group.
newSettings (PageViewGroup)The modified page view group.
index (int)Zero-based index of page view group to modify.
quiet (bool)true to disable any warning or error messages.
>true if successful, false otherwise.
ArgumentNullExceptionIf newSetting is null.
Explicit

ICollection<PageViewGroup>.Add

#Since v9.0
group (PageViewGroup)

Undelete

#Since v9.0
public bool Undelete(Guid id)
Undeletes a page view group that has been deleted.
id (Guid)Id of page view group.
true if successful, false otherwise.

Undelete

#Since v9.0
public bool Undelete(int index)
Undeletes a page view group that has been deleted.
index (int)Zero-based index of page view group.
true if successful, false otherwise.

UndoModify

#Since v9.0
[CLSCompliant(false)] public bool UndoModify(Guid id, uint undoRecordSerialNumber)
If the page view group has been modified and the modification can be undone, then this will restore the page view group to its previous state.
id (Guid)Id of page view group.
undoRecordSerialNumber (uint)
>true if successful, false otherwise.

UndoModify

#Since v9.0
public bool UndoModify(Guid id)
If the page view group has been modified and the modification can be undone, then this will restore the page view group to its previous state.
id (Guid)Id of page view group.
>true if successful, false otherwise.

UndoModify

#Since v9.0
[CLSCompliant(false)] public bool UndoModify(int index, uint undoRecordSerialNumber)
If the page view group has been modified and the modification can be undone, then this will restore the page view group to its previous state.
index (int)Zero-based index of page view group.
undoRecordSerialNumber (uint)Undo record serial number.
>true if successful, false otherwise.

UndoModify

#Since v9.0
public bool UndoModify(int index)
If the page view group has been modified and the modification can be undone, then this will restore the page view group to its previous state.
index (int)Zero-based index of page view group.
>true if successful, false otherwise.