T_Rhino_RhinoDoc - mcneel/rhinocommon-api-docs GitHub Wiki

RhinoDoc Class

Represents an active model.

Inheritance Hierarchy

System.Object
  Rhino.RhinoDoc
Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public sealed class RhinoDoc

VB

Public NotInheritable Class RhinoDoc

The RhinoDoc type exposes the following members.

Properties

 

Name Description
Public propertyStatic member ActiveDoc 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 Bitmaps bitmaps used in textures, backgrounds, wallpapers, ...
Public property CurrentUndoRecordSerialNumber

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 DateCreated
Public property DateLastEdited
Public propertyCode example DimStyles
Public property DistanceDisplayPrecision
Public property DocumentId **Obsolete. ** Gets the Document Id.
Public property EarthAnchorPoint
Public property Fonts
Public propertyCode example Groups
Public propertyCode example HatchPatterns
Public propertyCode example InstanceDefinitions
Public property IsLocked 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 IsReadOnly 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 IsSendingMail true if Rhino is in the process of sending this document as an email attachment.
Public property Layers Layers in the document.
Public property Lights
Public property Linetypes Linetypes in the document.
Public property Materials Materials in the document.
Public property MeshingParameterStyle Type of MeshingParameters currently used by the document to mesh objects
Public property ModelAbsoluteTolerance Model space absolute tolerance.
Public property ModelAngleToleranceDegrees Model space angle tolerance.
Public property ModelAngleToleranceRadians Model space angle tolerance.
Public propertyCode example ModelDistanceDisplayPrecision
Public property ModelRelativeTolerance Model space relative tolerance.
Public property ModelUnitSystem
Public property Modified Returns or sets the document's modified flag.
Public property Name Returns the name of the currently loaded Rhino document (3DM file).
Public property NamedConstructionPlanes
Public propertyCode example NamedViews
Public property NextUndoRecordSerialNumber The serial number that will be assigned to the next undo record that is constructed.
Public property Notes Returns or sets the document's notes.
Public property Objects
Public property PageAbsoluteTolerance Page space absolute tolerance.
Public property PageAngleToleranceDegrees Page space angle tolerance.
Public property PageAngleToleranceRadians Page space angle tolerance.
Public property PageDistanceDisplayPrecision
Public property PageRelativeTolerance Page space relative tolerance.
Public propertyCode example PageUnitSystem
Public property Path Returns the path of the currently loaded Rhino document (3DM file).
Public property RenderSettings
Public property RuntimeSerialNumber Unique serialNumber for the document while the application is running. This is not a persistent value.
Public property Strings
Public property TemplateFileUsed 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 UndoRecordingEnabled
Public property UndoRecordingIsActive true if undo recording is actually happening now.
Public property Views
  Back to Top

Methods

 

Name Description
Public method AddCustomUndoEvent(String, EventHandler(CustomUndoEventArgs))
Public methodCode example AddCustomUndoEvent(String, EventHandler(CustomUndoEventArgs), Object) Add a custom undo event so you can undo private plug-in data when the user performs an undo or redo
Public method AdjustModelUnitSystem
Public method AdjustPageUnitSystem
Public method BeginUndoRecord 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 ClearRedoRecords
Public method ClearUndoRecords(Boolean)
Public method ClearUndoRecords(UInt32, Boolean)
Public methodCode example CreateDefaultAttributes 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 EndUndoRecord
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodStatic member ExtractPreviewImage Extracts the bitmap preview image from the specified model (3DM).
Public method FindFile 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 methodStatic member FromFilePath Search the open document list for a document with a Path equal to the specified file path.
Public methodStatic member FromId **Obsolete. **
Public methodStatic member FromRuntimeSerialNumber
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetMeshingParameters Get MeshingParameters currently used by the document
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUnitSystemName
Public methodStatic member Open 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 methodStatic member OpenDocuments Returns a list of currently open Rhino documents
Public methodStatic member OpenFile **Obsolete. **
Public methodStatic member ReadFile
Public method ReadFileVersion Returns the file version of the current document. Use this function to determine which version of Rhino last saved the document.
Public method SetCustomMeshingParameters 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 ToString Returns a string that represents the current object. (Inherited from Object.)
Public method WriteFile
  Back to Top

Events

 

Name Description
Public eventStatic member ActiveDocumentChanged This event is raised when the active document used by modeless user interface changes. On Mac Rhino this will get raised before the NewDocument, BeginOpenDocument and EndOpenDocument 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 NewDocument, BeginOpenDocument and EndOpenDocument events when a new or existing model is opened.
Public eventStatic member AddRhinoObject Called if a new object is added to the document.
Public eventStatic memberCode example BeforeTransformObjects Called before objects are being transformed
Public eventStatic member BeginOpenDocument
Public eventStatic member BeginSaveDocument
Public eventStatic member CloseDocument
Public eventStatic member DeleteRhinoObject Called if an object is deleted. At some later point the object can be un-deleted.
Public eventStatic member DeselectAllObjects Called when all objects are deselected.
Public eventStatic member DeselectObjects Called when object(s) are deselected.
Public eventStatic member DocumentPropertiesChanged
Public eventStatic member EndOpenDocument
Public eventStatic member EndSaveDocument
Public eventStatic member GroupTableEvent Called when any modification happens to a document's group table.
Public eventStatic member InstanceDefinitionTableEvent Called when any modification happens to a document's light table.
Public eventStatic member LayerTableEvent Called when any modification happens to a document's layer table.
Public eventStatic member LightTableEvent Called when any modification happens to a document's light table.
Public eventStatic member MaterialTableEvent Called when any modification happens to a document's material table.
Public eventStatic member ModifyObjectAttributes Called when all object attributes are changed.
Public eventStatic member NewDocument
Public eventStatic member PurgeRhinoObject Called if an object is being purged from a document. The object will cease to exist forever.
Public eventStatic member ReplaceRhinoObject 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 eventStatic member SelectObjects Called when object(s) are selected.
Public eventStatic member TextureMappingEvent Called when any modification happens to a document objects texture mapping.
Public eventStatic member UndeleteRhinoObject Called if an object is un-deleted.
  Back to Top

Version Information

Supported in: 5D58w

See Also

Reference

Rhino Namespace

⚠️ **GitHub.com Fallback** ⚠️