RhinoPageView

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

Properties

ActiveDetail

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

ActiveDetailId

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

ActiveViewport

#Since v5.0
public override RhinoViewport ActiveViewport { get; }
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.

ActiveViewportID

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

Bounds

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

ClientRectangle

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

Description

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

DisplayPipeline

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

Document

public RhinoDoc Document { get; }
inherited fromRhinoView

Floating

public bool Floating { get; set; }
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.
inherited fromRhinoView

Handle

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

InDynamicViewChange

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

MainViewport

public RhinoViewport MainViewport { get; }
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.
inherited fromRhinoView

Maximized

public bool Maximized { get; set; }
inherited fromRhinoView

PageHeight

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

PageIsActive

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

PageName

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

PageNumber

#Since v5.0
public int PageNumber { get; set; }
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.

PageViewGroupCount

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

PageWidth

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

PaperName

#Since v6.15
public string PaperName { get; }
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.

PrinterName

#Since v6.15
public string PrinterName { get; set; }
Gets and sets the name of the layout's destination printer.
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

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

RuntimeSerialNumber

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

ScreenRectangle

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

Size

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

TitleVisible

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

Methods

AddDetailView

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

AddToPageViewGroup

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

CaptureToBitmap

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

ClientToScreen

public Point ClientToScreen(Point clientPoint)
inherited fromRhinoView
clientPoint (Point)

ClientToScreen

public Point2d ClientToScreen(Point2d clientPoint)
inherited fromRhinoView
clientPoint (Point2d)

Close

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

CreateShadedPreviewImage

public bool CreateShadedPreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane, bool useGhostedShading)
Creates a bitmap preview image of model.
inherited fromRhinoView
imagePath (string)[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 (Size)[in] The width and height of the bitmap in pixels.
ignoreHighlights (bool)true if highlighted elements should be drawn normally.
drawConstructionPlane (bool)true if the CPlane should be drawn.
useGhostedShading (bool)true if ghosted shading (partially transparent shading) should be used.
true if successful.

CreateWireframePreviewImage

public bool CreateWireframePreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane)
Creates a bitmap preview image of model.
inherited fromRhinoView
imagePath (string)[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 (Size)[in] The width and height of the bitmap in pixels.
ignoreHighlights (bool)true if highlighted elements should be drawn normally.
drawConstructionPlane (bool)true if the CPlane should be drawn.
true if successful.

Duplicate

#Since v6.3
public RhinoPageView Duplicate(bool duplicatePageGeometry)
Copies a page view.
duplicatePageGeometry (bool)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(object obj)
inherited fromRhinoView
obj (object)
Object.Equals

GetDetailViews

#Since v5.0
public DetailViewObject[] GetDetailViews()
Gets a list of the detail view objects associated with this layout.
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
public int[] GetPageViewGroupList()
Gets an array of page view group indices this page view belongs to.
An array of page view group indices if successful, otherwise an empty array.

GetPreviewImage

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

IsInPageViewGroup

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

MouseCaptured

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

PageViewGroupSortIndex

#Since v9.0
public int PageViewGroupSortIndex(int pageViewGroupIndex)
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.
pageViewGroupIndex (int)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

public void Redraw()
Redraws this view.
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.

RemoveFromAllageViewGroups

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

RemoveFromPageViewGroup

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

ScreenToClient

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

ScreenToClient

public Point2d ScreenToClient(Point2d screenPoint)
inherited fromRhinoView
screenPoint (Point2d)

SetActiveDetail

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

SetActiveDetail

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

SetPageAsActive

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

SetPageViewGroupSortIndex

#Since v9.0
public void SetPageViewGroupSortIndex(int pageViewGroupIndex, int sortIndex)
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.
pageViewGroupIndex (int)Zero-based index of the page view group.
sortIndex (int)The desired zero-based position within the group.

ShowToast

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

ShowToast

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

ShowToast

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

SpeedTest

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

Events

PageViewPropertiesChange

#
public static event EventHandler<PageViewPropertiesChangeEventArgs> PageViewPropertiesChange

PageViewSpaceChange

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