Skip to content

RhinoDoc

Public Class

Represents an active model.

Inheritance Hierarchy

System.Object
Rhino.RhinoDoc

Namespace: Rhino

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

public sealed class RhinoDoc : IDisposable

The RhinoDoc type exposes the following members.

Properties

Name

Description


Public Property

Get the ID of the active command.


Public Property
Static Member

WARNING!! Do not use the ActiveDoc if you don’t have to. Under Mac Rhino the ActiveDoc can change while a command is running. Use the doc that is passed to you in your RunCommand function or continue to use the same doc after the first call to ActiveDoc.


Public Property

Get the space associated with the active view for this document


Public Property

Public Property

bitmaps used in textures, backgrounds, wallpapers, …


Public Property

Obsolete.

Access to the current environment for various uses


Public Property

\>0: undo recording is active and being saved on the undo record with the specified serial number. 0: undo recording is not active. (Disabled or nothing is being recorded.)


Public Property

Public Property

Public Property

Returns the date the document was created in Coordinated Universal Time (UTC). Use DateTime.ToLocalTime to convert to local time.


Public Property
Code Example

Public Property

Public Property

Public Property

Obsolete.


Public Property

Obsolete.

Gets the ground plane of this document.


Public Property
Code Example

Public Property
Code Example

Public Property

Returns true if currently in a GetPoint.Get().


Public Property
Code Example

Public Property

Public Property

Public Property

Returns true if Rhino is currently running a command.


Public Property

Public Property

Public Property

Public Property

Check to see if the file associated with this document is locked. If it is locked then this is the only document that will be able to write the file. Other instances of Rhino will fail to write this document.


Public Property

Public Property

Current read-only mode for this document. true if the document can be viewed but NOT saved. false if document can be viewed and saved.


Public Property

true if Rhino is in the process of sending this document as an email attachment.


Public Property

Layers in the document.


Public Property

If LayoutSpaceAnnotationScaling is on, sizes in dimstyles are multiplied by dimscale when the annotation is displayed in a detail viewport not in a detail


Public Property

Public Property

Linetypes in the document.


Public Property

Public Property

Materials in the document.


Public Property

Type of MeshingParameters currently used by the document to mesh objects


Public Property

Model space absolute tolerance.


Public Property

Model space angle tolerance.


Public Property

Model space angle tolerance.


Public Property

The base point in the model that is used when inserting the model into another as a block definition. By default the base point in any model is 0,0,0.


Public Property
Code Example

Public Property

Model space relative tolerance.


Public Property

If ModelSpaceAnnotationScaling is on, sizes in dimstyles are multiplied by dimscale when the annotation is displayed in a model space viewport not in a detail


Public Property

The scale factor for hatches in model space when Hatch Scaling is enabled


Public Property

True if hatch scaling is enabled, false if not.


Public Property

The scale factor for text in model space when Annotation Scaling is enabled


Public Property

Public Property

Returns or sets the document’s modified flag.


Public Property

Returns the name of the currently loaded Rhino document (3DM file).


Public Property

Collection of named construction planes.


Public Property

Collection of named layer states.


Public Property

Collection of named positions.


Public Property
Code Example

Collection of named views.


Public Property

The serial number that will be assigned to the next undo record that is constructed.


Public Property

Returns or sets the document’s notes.


Public Property

Public Property

Public Property

Page space absolute tolerance.


Public Property

Page space angle tolerance.


Public Property

Page space angle tolerance.


Public Property

Public Property

Page space relative tolerance.


Public Property
Code Example

Public Property

Returns the path of the currently loaded Rhino document (3DM file).


Public Property

Obsolete.

Access to the post effects


Public Property

Returns true if Redo is currently active.


Public Property

Public Property

Public Property

Public Property

Public Property

Collection of document runtime data. This is a good place to put non-serializable, per document data, such as panel view models. Note well: This data will be dispose with the document and does not get serialized.


Public Property

Unique serialNumber for the document while the application is running. This is not a persistent value.


Public Property

Collection of snapshots.


Public Property

Collection of document user data strings in this document


Public Property
SubDAppearance

Returns or sets the appearance of all SubD objects in the document.


Public Property

name of the template file used to create this document. This is a runtime value only present if the document was newly created.


Public Property

Returns true if Undo is currently active.


Public Property

Public Property

true if undo recording is actually happening now.


Public Property

Public Property

Provides access to the document’s worksession.


Methods

Name

Description


Public Method

Public Method
Code Example

Add a custom undo event so you can undo private plug-in data when the user performs an undo or redo


Public Method

Public Method

Public Method

Instructs Rhino to begin recording undo information when the document is changed outside of a command. We use this, e.g., to save changes caused by the modeless layer or object properties dialogs when commands are not running.


Public Method

Public Method

Public Method

Public Method
Static Member

Creates a new RhinoDoc


Public Method
Code Example

Gets the default object attributes for this document. The attributes will be linked to the currently active layer and they will inherit the Document WireDensity setting.


Public Method
Static Member

Create a new headless RhinoDoc from a template file


Public Method

Returns the bounding box of custom render primitives for this object .


Public Method

Releases all resources used by the RhinoDoc


Public Method

Ends the undo record.


Public Method

(Overrides Object.Equals(Object).)


Public Method

Export the entire document to a file. All file formats that Rhino can export to are supported by this function.


Public Method

Export the entire document to a file. All file formats that Rhino can export to are supported by this function.


Public Method

Export selected geometry to a file. All file formats that Rhino can export to are supported by this function.


Public Method

Export selected geometry to a file. All file formats that Rhino can export to are supported by this function.


Public Method
Static Member

Extracts the bitmap preview image from the specified .3dm file.


Protected Method

(Overrides Object.Finalize..)


Public Method

Search for a file using Rhino’s search path. Rhino will look in the following places: 1. Current model folder 2. Path specified in options dialog/File tab 3. Rhino system folders 4. Rhino executable folder


Public Method

Call this method to get string representing the specified value using the documents display coordinate system and display precision.


Public Method

Call this method to get string representing the specified value using the documents display coordinate system and display precision.


Public Method
Static Member

Search the open document list for a document with a Path equal to the specified file path.


Public Method
Static Member

Obsolete.


Public Method
Static Member

Public Method

Get analysis meshing parameters currently used by the document


Public Method

Get the custom meshing parameters that this document will use.


Public Method

Get the custom unit system name and custom unit scale.


Public Method

Public Method

Public Method

Returns the active plane of Rhino’s auto-gumball widget. Note, when calling from a Rhino command, make sure the command class has the Rhino.Commands.Style.Transparent command style attribute.


Public Method

(Overrides Object.GetHashCode..)


Public Method

Get MeshingParameters currently used by the document


Public Method

Obsolete.

Build custom render mesh(es) for this document (i.e. - GH meshes).


Public Method

Obsolete.

Get a enumerable list of custom mesh primitives


Public Method

Obsolete.

Get a enumerable list of custom mesh primitives


Public Method

Obsolete.

Get a enumerable list of custom mesh primitives


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Public Method

Public Method

Returns true if the document has a set of custom render primitives - ie, CustomRenderMeshes will return non-null.


Public Method

Import geometry into a RhinoDoc from a file. This can be any file format that Rhino can import


Public Method

Import geometry into a RhinoDoc from a file. This can be any file format that Rhino can import


Public Method

This is a low level tool to determine if Rhino is currently running a command.


Public Method

Determines if a document unit system is a metric unit system.


Public Method
Static Member

Opens a 3dm file and makes it the active document. If called on windows the active document will be saved and closed and the new document will be opened and become the active document. If called on the Mac the file will be opened in a new document window.


Public Method
Static Member

Returns a list of currently open Rhino documents


Public Method
Static Member

Returns a list of currently open Rhino documents


Public Method
Static Member

Obsolete.


Public Method
Static Member

Opens a 3DM file into a new headless RhinoDoc.


Public Method
Static Member

Public Method

Returns the file version of the current document. Use this function to determine which version of Rhino last saved the document.


Public Method

Redo the last action that was “undone”


Public Method

Returns a set of non-object custom render primitives for this document.


Public Method

Save doc to disk using the document’s Path


Public Method

Save doc as a 3dm to a specified path using the current Rhino file version


Public Method

Save doc as a 3dm to a specified path


Public Method

Save doc as a 3dm to a specified path


Public Method

Save this document as a template


Public Method

Save this document as a template to a specific Rhino file version


Public Method

Selects a collection of contents in any editors they appear in.


Public Method

Set the custom meshing parameters that this document will use. You must also modify the MeshingParameterStyle property on the document to Custom if you want these meshing parameters to be used


Public Method

Changes the unit system to custom units and sets the custom unit scale.


Public Method

Public Method

Obsolete.

Determines if custom render meshes will be built for this document (i.e. - GH meshes).


Public Method

ToString

Returns a string that represents the current object.

(Inherited from Object.)


Public Method

Obsolete.

Get the bounding box for the custom render meshes associated with this document (i.e. - GH meshes).


Public Method

Undo the last action


Public Method

Write information in this document to a .3dm file. Note, the active document’s name will not be changed.


Public Method
WriteFile

Write information in this document to a file. Note, the active document’s name will be changed to that of the path provided.


Events

Name

Description


Public Event
Static Member

This event is raised when the active document used by modeless user interface changes. On Mac Rhino this will get raised before the

, and events. Mac Rhino will also raise this event with 0 for the document Id and a null document pointer when the last document is closed. Windows Rhino will raise this event after the , and events when a new or existing model is opened.


Public Event
Static Member

Called if a new object is added to the document.


Public Event
Static Member
Code Example

Called before objects are being transformed


Public Event
Static Member

This event is raised when the document open operation begins. NOTE: On Windows, this event will be fired when a clipboard paste operation occurs, as Rhino opens a .tmp file in the User’s Local folder with the contents of the pasted document.


Public Event
Static Member

Public Event
Static Member

Public Event
Static Member

Called if an object is deleted. At some later point the object can be un-deleted.


Public Event
Static Member

Called when all objects are deselected.


Public Event
Static Member

Called when object(s) are deselected.


Public Event
Static Member

Called when any modification happens to a document’s dimension style table.


Public Event
Static Member

Public Event
Static Member

Public Event
Static Member

This event is raised after

when the documents initial views have been created and initialized.


Public Event
Static Member

Public Event
Static Member

Called when any modification happens to a document’s group table.


Public Event
Static Member

Called when any modification happens to a document’s instance definition table.


Public Event
Static Member

Called when any modification happens to a document’s layer table.


Public Event
Static Member

Called when any modification happens to a document’s light table.


Public Event
Static Member

Called when any modification happens to a document’s linetype table.


Public Event
Static Member

Called when any modification happens to a document’s material table.


Public Event
Static Member

Called when all object attributes are changed.


Public Event
Static Member

Public Event
Static Member

Called if an object is being purged from a document. The object will cease to exist forever.


Public Event
Static Member

Public Event
Static Member

Public Event
Static Member

Called when the RenderTextureTable has been loaded, is about to be cleared or has been cleared. See RhinoDoc.RenderContentTableEventType for more information.


Public Event
Static Member

Called if an object is about to be replaced. If both RhinoDoc.UndoActive() and RhinoDoc.RedoActive() return false, then immediately after the ReplaceObject event, there will be a DeleteObject event followed by an AddObject event. If either RhinoDoc.UndoActive() or RhinoDoc::RedoActive() return true, then immediately after the ReplaceObject event, there will be a DeleteObject event followed by an UndeleteObject event.


Public Event
Static Member

Called when object(s) are selected.


Public Event
Static Member

Called when any modification happens to a document objects texture mapping.


Public Event
Static Member

Called if an object is un-deleted.


Public Event
Static Member

Called when a change in the model units results in a scaling operation on all of the objects in the document. This call is made before any of the objects are scaled. A call to RhinoDoc.DocumentPropertiesChanged follows.


Public Event
Static Member

This event is raised when document user text strings are changed