RhinoPageView

RhinoViewReferences
public class RhinoPageView : RhinoView
A window that contains a single layout 'page'

Properties

ActiveDetail

#Since v7.0
Returns the active detail object. If no detail is active, or if the page is active, then null is returned.
public DetailViewObject ActiveDetail { get; }

ActiveDetailId

#Since v7.0
Returns the id of the active detail. If no detail is active, or if the page is active, then Guid.Empty is returned.
public Guid ActiveDetailId { get; }

ActiveViewport

#Since v5.0
Gets the active viewport. The ActiveViewport is the same as the MainViewport for standard RhinoViews. In a RhinoPageView, the active viewport may be the RhinoViewport of a child detail object. Most of the time, you will use ActiveViewport unless you explicitly need to work with the main viewport.
public override RhinoViewport ActiveViewport { get; }

ActiveViewportID

Returns viewport ID for the active viewport. Faster than ActiveViewport function when working with page views.
public Guid ActiveViewportID { get; }
inherited fromRhinoView

Bounds

Gets the size and location of the view including its non-client elements, in pixels, relative to the parent control.
public Rectangle Bounds { get; }
inherited fromRhinoView

ClientRectangle

Gets the rectangle that represents the client area of the view.
public Rectangle ClientRectangle { get; }
inherited fromRhinoView

Description

#Since v9.0
Gets and sets a brief description of the page view.
public string Description { get; set; }

DisplayPipeline

Gets the display pipeline used for this view.
public DisplayPipeline DisplayPipeline { get; }
inherited fromRhinoView

Document

public RhinoDoc Document { get; }
inherited fromRhinoView

Floating

Floating state of RhinoView. if true, then the view will be in a floating frame window. Otherwise the view will be embedded in the main frame.
public bool Floating { get; set; }
inherited fromRhinoView

Handle

Gets the window handle that this view is bound to.
public nint Handle { get; }
inherited fromRhinoView

InDynamicViewChange

true if the view is being dynamically changed by mouse moves, arrow keys, trackballs, etc.
public bool InDynamicViewChange { get; }
inherited fromRhinoView

MainViewport

A RhinoView contains a "main viewport" that fills the entire view client window. RhinoPageViews may also contain nested child RhinoViewports for implementing detail viewports. The MainViewport will always return this RhinoView's m_vp.
public RhinoViewport MainViewport { get; }
inherited fromRhinoView

Maximized

public bool Maximized { get; set; }
inherited fromRhinoView

PageHeight

#ExampleSince v5.10
Height of the page in the document's PageUnitSystem
public double PageHeight { get; set; }

PageIsActive

#ExampleSince v5.0
Returns true if the page is active, rather than any detail view. This occurs when the MainViewport.Id == ActiveViewportID.
public bool PageIsActive { get; }

PageName

#ExampleSince v5.0
Same as the MainViewport.Name.
public string PageName { get; set; }

PageNumber

#Since v5.0
Gets or sets the runtime page number and updates the page number for all of the other pages. The first page has a value of 0.
public int PageNumber { get; set; }

PageViewGroupCount

#Since v9.0
Gets the number of page view groups this page view belongs to.
public int PageViewGroupCount { get; }

PageWidth

#ExampleSince v5.10
Width of the page in the document's PageUnitSystem
public double PageWidth { get; set; }

PaperName

#Since v6.15
Returns the name of the layout's media, or paper (e.g. Letter, Legal, A1, etc.), used to determine the page width and page height.
public string PaperName { get; }

PrinterName

#Since v6.15
Gets and sets the name of the layout's destination printer.
public string PrinterName { get; set; }
Remarks: The name is not validated against the printers installed on this system. On Windows, setting it can change what PaperName returns, because that name is looked up in the destination printer's list of forms. Other platforms do not consult the printer, so PaperName is unaffected there.

RealtimeDisplayMode

Gets the RealtimeDisplayMode active for this view. null if the view doesn't have a RealtimeDisplayMode set.
public RealtimeDisplayMode RealtimeDisplayMode { get; }
inherited fromRhinoView

RuntimeSerialNumber

[CLSCompliant(false)] public uint RuntimeSerialNumber { get; }
inherited fromRhinoView

ScreenRectangle

Gets the rectangle that represents the client area of the view in screen coordinates.
public Rectangle ScreenRectangle { get; }
inherited fromRhinoView

Size

Gets or sets the size of the view
public Size Size { get; set; }
inherited fromRhinoView

TitleVisible

Visibility of the viewport title window.
public bool TitleVisible { get; set; }
inherited fromRhinoView

Methods

AddDetailView

#ExampleSince v5.0
Creates a detail view object that is displayed on this page and adds it to the document.
public DetailViewObject AddDetailView(
title,
The detail view title.
corner0,
Corners of the detail view in world coordinates.
corner1,
Corners of the detail view in world coordinates.
initialProjection
The defined initial projection type.
)
Newly created detail view on success, null on error.

AddToPageViewGroup

#Since v9.0
Add this page view to a page view group.
public void AddToPageViewGroup(
pageViewGroupIndex
Zero-based index of the page view group.
)

CaptureToBitmap

Capture View contents to a bitmap.
public Bitmap CaptureToBitmap()
inherited fromRhinoView
The bitmap of the complete view.

CaptureToBitmap

Captures the view contents to a bitmap allowing for visibility of grid and axes.
public Bitmap CaptureToBitmap(
grid,
true if the construction plane grid should be visible.
worldAxes,
true if the world axis should be visible.
cplaneAxes
true if the construction plane close the grid should be visible.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Capture View contents to a bitmap using a display mode description to define how drawing is performed.
public Bitmap CaptureToBitmap(
mode
The display mode.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Captures view contents to a bitmap using display attributes to define how drawing is performed.
public Bitmap CaptureToBitmap(
attributes
The specific display mode attributes.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Captures a part of the view contents to a bitmap allowing for visibility of grid and axes.
public Bitmap CaptureToBitmap(
size,
The width and height of the returned bitmap.
grid,
true if the construction plane grid should be visible.
worldAxes,
true if the world axis should be visible.
cplaneAxes
true if the construction plane close the grid should be visible.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Capture View contents to a bitmap using a display mode description to define how drawing is performed.
public Bitmap CaptureToBitmap(
size,
The width and height of the returned bitmap.
mode
The display mode.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Capture View contents to a bitmap using display attributes to define how drawing is performed.
public Bitmap CaptureToBitmap(
size,
The width and height of the returned bitmap.
attributes
The specific display mode attributes.
)
inherited fromRhinoView
A new bitmap.

CaptureToBitmap

Capture View contents to a bitmap.
public Bitmap CaptureToBitmap(
size
Size of Bitmap to capture to.
)
inherited fromRhinoView
The bitmap of the specified part of the view.

ClientToScreen

public Point ClientToScreen(
clientPoint
)
inherited fromRhinoView

ClientToScreen

public Point2d ClientToScreen(
clientPoint
)
inherited fromRhinoView

Close

Remove this View from Rhino. DO NOT attempt to use this instance of this class after calling Close.
public bool Close()
inherited fromRhinoView
true on success

CreateShadedPreviewImage

Creates a bitmap preview image of model.
public bool CreateShadedPreviewImage(
imagePath,
[in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF).
size,
[in] The width and height of the bitmap in pixels.
ignoreHighlights,
true if highlighted elements should be drawn normally.
drawConstructionPlane,
true if the CPlane should be drawn.
useGhostedShading
true if ghosted shading (partially transparent shading) should be used.
)
inherited fromRhinoView
true if successful.

CreateWireframePreviewImage

Creates a bitmap preview image of model.
public bool CreateWireframePreviewImage(
imagePath,
[in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF).
size,
[in] The width and height of the bitmap in pixels.
ignoreHighlights,
true if highlighted elements should be drawn normally.
drawConstructionPlane
true if the CPlane should be drawn.
)
inherited fromRhinoView
true if successful.

Duplicate

#Since v6.3
Copies a page view.
public RhinoPageView Duplicate(
duplicatePageGeometry
Set true if you want the page view geometry copied, along with the view.
)
The new page view if successful, null otherwise.

Equals

public override bool Equals(
obj
)
inherited fromRhinoView
Object.Equals

GetDetailViews

#Since v5.0
Gets a list of the detail view objects associated with this layout.
public DetailViewObject[] GetDetailViews()
An array of detail view objects if successful, an empty array if the layout has no details.

GetHashCode

public override int GetHashCode()
inherited fromRhinoView

GetPageViewGroupList

#Since v9.0
Gets an array of page view group indices this page view belongs to.
public int[] GetPageViewGroupList()
An array of page view group indices if successful, otherwise an empty array.

GetPreviewImage

#Since v7.0
Creates a preview image of the page.
public Bitmap GetPreviewImage(
size,
The size of the preview image.
grayScale
Set true to produce a grayscale image, false to produce a color image.
)
A bitmap if successful, null otherwise.

IsInPageViewGroup

#Since v9.0
Determines if this page view belongs in a page view group.
public bool IsInPageViewGroup(
pageViewGroupIndex
)
True if the page view belongs in the page view group, otherwise false.

MouseCaptured

Returns whether or not the mouse is captured in this view.
public bool MouseCaptured(
bIncludeMovement
If captured, test if the mouse has moved between mouse button down and mouse button up.
)
inherited fromRhinoView
true if captured, false otherwise.

PageViewGroupSortIndex

#Since v9.0
Gets this page view's sort index within a page view group. The sort index determines the order of the page view among the other members of the group, independent of the document page (view-table) order.
public int PageViewGroupSortIndex(
pageViewGroupIndex
Zero-based index of the page view group.
)
The zero-based sort index, or RhinoMath.UnsetIntIndex when the page view is not in the group or the group is unsorted (uses page-number order).

Redraw

Redraws this view.
public void Redraw()
inherited fromRhinoView
Remarks: If you change something in "this" view like the projection, construction plane, background bitmap, etc., then you need to call RhinoView.Redraw() to redraw "this" view./ The other views will not be changed. If you change something in the document (like adding new geometry to the model), then you need to call RhinoDoc.Views.Redraw() to redraw all the views.

RedrawOverlays

Redraws this view without regenerating its contents, when possible.
public void RedrawOverlays()
inherited fromRhinoView
Remarks: Use this when only what display conduits draw in the DrawOverlay channel has changed. If nothing in the document or view has changed since the last frame, the previously captured frame is reused and only the overlays are drawn on top of it, which is much faster than RhinoView.Redraw() for expensive scenes such as layouts with many details. If something has changed, the view is fully redrawn, the same as RhinoView.Redraw().

RemoveFromAllageViewGroups

#Since v9.0
Removes this page view to all page view groups.
public void RemoveFromAllageViewGroups()

RemoveFromPageViewGroup

#Since v9.0
Removes this page view to a page view group.
public void RemoveFromPageViewGroup(
pageViewGroupIndex
Zero-based index of the page view group.
)

ScreenToClient

Converts a point in screen coordinates to client coordinates for this view.
public Point ScreenToClient(
screenPoint
The 2D screen point.
)
inherited fromRhinoView
A 2D point in client coordinates.

ScreenToClient

public Point2d ScreenToClient(
screenPoint
)
inherited fromRhinoView

SetActiveDetail

#ExampleSince v5.0
Sets the active detail.
public bool SetActiveDetail(
detailId
The id of the detail view object to set active.
)
true if successful, false otherwise.

SetActiveDetail

#Since v5.0
Sets the active detail.
public bool SetActiveDetail(
detailName,
The name, or title, of the detail to set active.
compareCase
Unused.
)
true if successful, false otherwise.

SetPageAsActive

#ExampleSince v5.0
Deactivates the active details and sets the page view as active.
public void SetPageAsActive()

SetPageViewGroupSortIndex

#Since v9.0
Sets this page view's sort index (position) within a page view group, repositioning it among the group's members and renumbering the rest so the group stays contiguously ordered. A sort index at or beyond the member count moves the page view to the end. If the page view is not yet in the group, it is added.
public void SetPageViewGroupSortIndex(
pageViewGroupIndex,
Zero-based index of the page view group.
sortIndex
The desired zero-based position within the group.
)

ShowToast

Shows a temporary popup message in the lower right corner of the view
[CLSCompliant(false)] public uint ShowToast(
message,
The message to be shown
textHeight,
The height of the message
location
The location of the message
)
inherited fromRhinoView
The runtime serial number of the view toast

ShowToast

Shows a temporary popup message in the lower right corner of the view
[CLSCompliant(false)] public uint ShowToast(
message,
The message to be shown
textHeight
The height of the message
)
inherited fromRhinoView
The runtime serial number of the view toast

ShowToast

Shows a temporary popup message in the lower right corner of the view
[CLSCompliant(false)] public uint ShowToast(
message
The message to be shown
)
inherited fromRhinoView
The runtime serial number of the view toast

SpeedTest

public double SpeedTest(
frameCount,
freezeDrawList,
direction,
angleDeltaRadians
)
inherited fromRhinoView

Events

PageViewPropertiesChange

#
public static event EventHandler<PageViewPropertiesChangeEventArgs> PageViewPropertiesChange

PageViewSpaceChange

#Since v5.0
public static event EventHandler<PageViewSpaceChangeEventArgs> PageViewSpaceChange