NamedViewTable

References
public sealed class NamedViewTable : IEnumerable<ViewInfo>
All named views in a rhino document.

Properties

Count

#Since v5.0
Number of named views in the table.
public int Count { get; }

Document

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

Selection

#Since v8.5
Returns the current selection in the Named Views panel. If more than one such panel is open, it will return the selection in the most recently opened panel.
public string[] Selection { get; }

Indexers

this[]

#
Conceptually, the named view table is an array of ViewInfo and their associated names. The indexing operator ([] in C#) can be used to get individual ViewInfo items.
public ViewInfo this[
index
Zero based array index.
] { get; }
The view that was found.

Methods

Add

#ExampleSince v5.0
Adds named view to document which is based on an existing viewport.
public int Add(
name,
If name is empty, a unique name is automatically created. If there is already a named view with the same name, that view is replaced.
viewportId
Id of an existing viewport in the document. View information is copied from this viewport.
)
0 based index of named view. -1 on failure.

Add

#Since v5.0
public int Add()

Delete

#Since v5.0
Remove named view from the document.
public bool Delete(
index
index of the named view in the named view table.
)
true if successful.

Delete

#Since v5.0
Remove named view from the document.
public bool Delete(
name
name of the view.
)
true if successful.

FindByName

#Since v5.0
Finds a named view.
public int FindByName(
name
name to search for.
)
>=0 index of the found named view -1 no named view found.

GetEnumerator

#Since v5.0
public IEnumerator<ViewInfo> GetEnumerator()

Rename

#Since v7.0
Renames a named view.
public bool Rename(
index,
Index of the named view in the named view table.
newName
The new name.
)
true if successful, false otherwise.

Rename

#Since v7.0
Renames a named view.
public bool Rename(
oldName,
The name of a named view in the named view table.
newName
The new name.
)
true if successful, false otherwise.

Restore

#Since v5.0 Obsolete v6.0
public bool Restore(
index,
view,
backgroundBitmap
)
obsoleteSupport for backgroundBitmap is ended

Restore

#Since v5.9 Obsolete v6.0
public bool Restore(
index,
viewport,
backgroundBitmap
)
obsoleteSupport for backgroundBitmap is ended

Restore

#Since v6.0
Sets the MainViewport of a standard RhinoView to a named views settings
public bool Restore(
index,
viewport
)

RestoreAnimated

#Since v5.0 Obsolete v6.0
public bool RestoreAnimated(
index,
view,
backgroundBitmap,
frames,
frameRate
)
obsoleteSupport for backgroundBitmap is ended

RestoreAnimated

#Since v5.0 Obsolete v6.0
public bool RestoreAnimated(
index,
view,
backgroundBitmap
)
obsoleteSupport for backgroundBitmap is ended

RestoreAnimated

#Since v5.9 Obsolete v6.0
public bool RestoreAnimated(
index,
viewport,
backgroundBitmap,
frames,
frameRate
)
obsoleteSupport for backgroundBitmap is ended

RestoreAnimated

#Since v5.9 Obsolete v6.0
public bool RestoreAnimated(
index,
viewport,
backgroundBitmap
)
obsoleteSupport for backgroundBitmap is ended

RestoreAnimatedConstantSpeed

#Since v6.0
public bool RestoreAnimatedConstantSpeed(
index,
viewport,
units_per_frame,
ms_delay
)

RestoreAnimatedConstantTime

#Since v6.0
public bool RestoreAnimatedConstantTime(
index,
viewport,
frames,
ms_delay
)

RestoreWithAspectRatio

#Since v6.0
public bool RestoreWithAspectRatio(
index,
viewport
)
Explicit

IEnumerable.GetEnumerator

#Since v5.0
IEnumerator IEnumerable.GetEnumerator()