NamedViewTable

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

Properties

Count

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

Document

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

Selection

#Since v8.5
public string[] Selection { get; }
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.

Indexers

this[]

#
public ViewInfo this[int index] { get; }
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.
index (int)Zero based array index.
The view that was found.

Methods

Add

#ExampleSince v5.0
public int Add(string name, Guid viewportId)
Adds named view to document which is based on an existing viewport.
name (string)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 (Guid)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(ViewInfo view)
view (ViewInfo)

Delete

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

Delete

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

FindByName

#Since v5.0
public int FindByName(string name)
Finds a named view.
name (string)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
public bool Rename(int index, string newName)
Renames a named view.
index (int)Index of the named view in the named view table.
newName (string)The new name.
true if successful, false otherwise.

Rename

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

Restore

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

Restore

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

Restore

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

RestoreAnimated

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

RestoreAnimated

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

RestoreAnimated

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

RestoreAnimated

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

RestoreAnimatedConstantSpeed

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

RestoreAnimatedConstantTime

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

RestoreWithAspectRatio

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

IEnumerable.GetEnumerator

#Since v5.0
IEnumerator IEnumerable.GetEnumerator()