ViewTable

References
public sealed class ViewTable : IEnumerable<RhinoView>

Properties

ActiveView

#ExampleSince v5.0
public RhinoView ActiveView { get; set; }
Gets or Sets the active view.

Document

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

ModelSpaceIsActive

#Since v5.0
[DebuggerBrowsable(DebuggerBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)] public bool ModelSpaceIsActive { get; }
obsolete. Use RhinoDoc.ActiveSpace instead

PageViewCount

#Since v9.0
public int PageViewCount { get; }
Gets the number of page views in the document

RedrawEnabled

#Since v5.0
public bool RedrawEnabled { get; set; }
Returns or sets (enable or disables) screen redrawing.

Methods

Add

#Since v5.0
public RhinoView Add(string title, DefinedViewportProjection projection, Rectangle position, bool floating)
Constructs a new Rhino view and, at the same time, adds it to the list.
title (string)The title of the new Rhino view.
projection (DefinedViewportProjection)A basic projection type.
position (Rectangle)A position.
floating (bool)true if the view floats; false if it is docked.
The newly constructed Rhino view; or null on error.

AddPageView

#Since v9.0
public RhinoPageView AddPageView(string title, bool setActive)
Constructs a new page view with a given title and, at the same time, adds it to the list.
Remarks: On Mac, building a page view's window is main-thread work. If setActive is true and this is called from another thread, the page view is created but may not have become the active view by the time this returns.
title (string)If null or empty, a name will be generated as "Page #" where # is the largest page number.
setActive (bool)If true, the new page view becomes the active view. If false, the view that was active before this call remains the active view.
The newly created page view on success; or null on error.

AddPageView

#Since v9.0
public RhinoPageView AddPageView(string title, double pageWidth, double pageHeight, bool setActive)
Constructs a new page view with a given title and size and, at the same time, adds it to the list.
Remarks: On Mac, building a page view's window is main-thread work. If setActive is true and this is called from another thread, the page view is created but may not have become the active view by the time this returns.
title (string)If null or empty, a name will be generated as "Page #" where # is the largest page number.
pageWidth (double)The page total width.
pageHeight (double)The page total height.
setActive (bool)If true, the new page view becomes the active view. If false, the view that was active before this call remains the active view.
The newly created page view on success; or null on error.

AddPageView

#ExampleSince v5.0
public RhinoPageView AddPageView(string title, double pageWidth, double pageHeight)
Constructs a new page view with a given title and size and, at the same time, adds it to the list. On Windows the new page view becomes the active view; on Mac the active view does not change. Use the overload with a setActive parameter for behavior that is consistent across platforms.
title (string)If null or empty, a name will be generated as "Page #" where # is the largest page number.
pageWidth (double)The page total width.
pageHeight (double)The page total height.
The newly created page view on success; or null on error.

AddPageView

#Since v5.0
public RhinoPageView AddPageView(string title)
Constructs a new page view with a given title and, at the same time, adds it to the list. On Windows the new page view becomes the active view; on Mac the active view does not change. Use the overload with a setActive parameter for behavior that is consistent across platforms.
title (string)If null or empty, a name will be generated as "Page #" where # is the largest page number.
The newly created page view on success; or null on error.

DefaultViewLayout

#Since v5.0
public void DefaultViewLayout()

EnableCameraIcon

#Since v6.0
public void EnableCameraIcon(RhinoView view)
Use to turn camera icon on and off
view (RhinoView)If null, any camera icon is turned off. If not null, the camera icon for that view is turned on.

EnableRedraw

#Since v7.3
public void EnableRedraw(bool enable, bool redrawDocument, bool redrawLayers)
Enables or disables screen redrawing.
enable (bool)Enable redrawing.
redrawDocument (bool)If enabling, set to true to have the document redrawn.
redrawLayers (bool)If enabling, set to true to have the layer user interface redrawn.

Find

#Since v5.0
public RhinoView Find(Guid mainViewportId)
Finds a view in this document with a given main viewport Id.
mainViewportId (Guid)The ID of the main viewport looked for.
View on success. null if the view could not be found in this document.

Find

#Since v5.0
public RhinoView Find(string mainViewportName, bool compareCase)
Finds a view in this document with a main viewport that has a given name. Note that there may be multiple views in this document that have the same name. This function only returns the first view found. If you want to find all the views with a given name, use the GetViewList function and iterate through the views.
mainViewportName (string)The name of the main viewport.
compareCase (bool)true if capitalization influences comparison; otherwise, false.
A Rhino view on success; null on error.

FlashObjects

#Since v5.0
public void FlashObjects(IEnumerable<RhinoObject> list, bool useSelectionColor)
Cause objects selection state to change momentarily so the object appears to flash on the screen.
list (IEnumerable<RhinoObject>)An array, a list or any enumerable set of Rhino objects.
useSelectionColor (bool)If true, flash between object color and selection color. If false, flash between visible and invisible.

FourViewLayout

#Since v5.0
public void FourViewLayout(bool useMatchingViews)
useMatchingViews (bool)

GetEnumerator

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

GetPageViews

#ExampleSince v5.0
public RhinoPageView[] GetPageViews()
Gets all page views in the document.
An array with all page views. The return value can be an empty array but not null.

GetStandardRhinoViews

#Since v5.0
public RhinoView[] GetStandardRhinoViews()

GetViewList

#Since v5.0 Obsolete v8.0
[EditorBrowsable(EditorBrowsableState.Never)] public RhinoView[] GetViewList(bool includeStandardViews, bool includePageViews)
Gets an array of all the views.
includeStandardViews (bool)true if "Right", "Perspective", etc., view should be included; false otherwise.
includePageViews (bool)true if page-related views should be included; false otherwise.
A array of Rhino views. This array can be empty, but not null.

GetViewList

#Since v8.0
public RhinoView[] GetViewList(ViewTypeFilter filter)
Gets an array of all the views.
filter (ViewTypeFilter)View types to include
An array of Rhino views. This array can be empty, but not null.

ImportPageView

#Since v9.0
public bool ImportPageView(string filename, Guid mainViewportId, string pageName)
Imports a page view, or layout, from a Rhino file into this document.
filename (string)The name of Rhino file to read from.
mainViewportId (Guid)The id of the page view on the Rhino file.
pageName (string)The name to give the newly imported page view.

IsCameraIconVisible

#Since v6.0
public bool IsCameraIconVisible(RhinoView view)
Determine if a camera icon is being shown
view (RhinoView)if null, then all views are tested. If not null, then just view is tested.

Redraw

#ExampleSince v5.0
public void Redraw()
Redraws all views.
Remarks: If you change something in the document -- like adding objects, deleting objects, modifying layer or object display attributes, etc., then you need to call Redraw to redraw all the views. If you change something in a particular view like the projection, construction plane, background bitmap, etc., then you need to call CRhinoView::Redraw to redraw that particular view.

Redraw

#ExampleSince v9.0
public void Redraw(bool deferred)
Redraws all views.
Remarks: If you change something in the document -- like adding objects, deleting objects, modifying layer or object display attributes, etc., then you need to call Redraw to redraw all the views. If you change something in a particular view like the projection, construction plane, background bitmap, etc., then you need to call CRhinoView::Redraw to redraw that particular view.
deferred (bool)false if screen needs to be refreshed now; false otherwise.
Explicit

IEnumerable.GetEnumerator

#Since v5.0
IEnumerator IEnumerable.GetEnumerator()

ThreeViewLayout

#Since v5.0
public void ThreeViewLayout(bool useMatchingViews)
useMatchingViews (bool)