Click or drag to resize

RhinoDoc Class

Represents an active model.
Inheritance Hierarchy

Namespace:  Rhino
Assembly:  RhinoCommon (in RhinoCommon.dll)
public sealed class RhinoDoc

The RhinoDoc type exposes the following members.

Public propertyStatic memberActiveDoc
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 propertyBitmaps
bitmaps used in textures, backgrounds, wallpapers, ...
Public propertyCurrentEnvironment
Access to the current environment for various uses
Public propertyCurrentUndoRecordSerialNumber
>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 propertyCustomRenderSizes
Public propertyDateCreated
Public propertyDateLastEdited
Public propertyCode exampleDimStyles
Public propertyDistanceDisplayPrecision
Public propertyDocumentId Obsolete.
Gets the Document Id.
Public propertyEarthAnchorPoint
Public propertyFonts
Public propertyGroundPlane
Gets the ground plane of this document.
Public propertyCode exampleGroups
Public propertyCode exampleHatchPatterns
Public propertyCode exampleInstanceDefinitions
Public propertyIsAvailable
Public propertyIsClosing
Public propertyIsCreating
Public propertyIsInitializing
Public propertyIsLocked
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 propertyIsOpening
Public propertyIsReadOnly
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 propertyIsSendingMail
true if Rhino is in the process of sending this document as an email attachment.
Public propertyLayers
Layers in the document.
Public propertyLayoutSpaceAnnotationScalingEnabled
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 propertyLights
Public propertyLinetypes
Linetypes in the document.
Public propertyManifest
Public propertyMaterials
Materials in the document.
Public propertyMeshingParameterStyle
Type of MeshingParameters currently used by the document to mesh objects
Public propertyModelAbsoluteTolerance
Model space absolute tolerance.
Public propertyModelAngleToleranceDegrees
Model space angle tolerance.
Public propertyModelAngleToleranceRadians
Model space angle tolerance.
Public propertyCode exampleModelDistanceDisplayPrecision
Public propertyModelRelativeTolerance
Model space relative tolerance.
Public propertyModelSpaceAnnotationScalingEnabled
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 propertyModelSpaceHatchScale
The scale factor for hatches in model space when Hatch Scaling is enabled
Public propertyModelSpaceTextScale
The scale factor for text in model space when Annotation Scaling is enabled
Public propertyModelUnitSystem
Public propertyModified
Returns or sets the document's modified flag.
Public propertyName
Returns the name of the currently loaded Rhino document (3DM file).
Public propertyNamedConstructionPlanes
Public propertyNamedPositions
Public propertyCode exampleNamedViews
Public propertyNextUndoRecordSerialNumber
The serial number that will be assigned to the next undo record that is constructed.
Public propertyNotes
Returns or sets the document's notes.
Public propertyObjects
Public propertyPageAbsoluteTolerance
Page space absolute tolerance.
Public propertyPageAngleToleranceDegrees
Page space angle tolerance.
Public propertyPageAngleToleranceRadians
Page space angle tolerance.
Public propertyPageDistanceDisplayPrecision
Public propertyPageRelativeTolerance
Page space relative tolerance.
Public propertyCode examplePageUnitSystem
Public propertyPath
Returns the path of the currently loaded Rhino document (3DM file).
Public propertyRedoActive
Returns true if Redo is currently active.
Public propertyRenderEnvironments
Public propertyRenderMaterials
Public propertyRenderSettings
Public propertyRenderTextures
Public propertyRuntimeData
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 serailzed.
Public propertyRuntimeSerialNumber
Unique serialNumber for the document while the application is running. This is not a persistent value.
Public propertyStrings
Collection of document user data strings in this document
Public propertyTemplateFileUsed
name of the template file used to create this document. This is a runtime value only present if the document was newly created.
Public propertyUndoActive
Returns true if Undo is currently active.
Public propertyUndoRecordingEnabled
Public propertyUndoRecordingIsActive
true if undo recording is actually happening now.
Public propertyViews
Public propertyWorksession
Provides access to the document's worksession.
Public methodAddCustomUndoEvent(String, EventHandlerCustomUndoEventArgs)
Public methodCode exampleAddCustomUndoEvent(String, EventHandlerCustomUndoEventArgs, Object)
Add a custom undo event so you can undo private plug-in data when the user performs an undo or redo
Public methodAdjustModelUnitSystem
Public methodAdjustPageUnitSystem
Public methodBeginUndoRecord
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 methodClearRedoRecords
Public methodClearUndoRecords(Boolean)
Public methodClearUndoRecords(UInt32, Boolean)
Public methodStatic memberCreate
Creates a new RhinoDoc
Public methodCode exampleCreateDefaultAttributes
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 methodEndUndoRecord
Ends the undo record.
Public methodEquals(Object) (Inherited from Object.)
Public methodEquals(Object) (Overrides ObjectEquals(Object).)
Public methodStatic memberExtractPreviewImage
Extracts the bitmap preview image from the specified model (3DM).
Public methodFindFile
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 memberFromFilePath
Search the open document list for a document with a Path equal to the specified file path.
Public methodStatic memberFromId Obsolete.
Public methodStatic memberFromRuntimeSerialNumber
Public methodGetAnalysisMeshingParameters
Get analysis meshing parameters currently used by the document
Public methodGetCurrentMeshingParameters
Get the custom meshing parameters that this document will use.
Public methodGetEmbeddedFilesList
Public methodGetGumballPlane
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 methodGetHashCode (Inherited from Object.)
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetMeshingParameters
Get MeshingParameters currently used by the document
Public methodGetRenderPrimitives(Boolean, Boolean)
Get a enumerable list of custom mesh primitives
Public methodGetRenderPrimitives(ViewportInfo, Boolean, Boolean)
Get a enumerable list of custom mesh primitives
Public methodGetRenderPrimitives(Guid, ViewportInfo, Boolean, Boolean)
Get a enumerable list of custom mesh primitives
Public methodGetType (Inherited from Object.)
Public methodGetUnitSystemName
Public methodStatic memberOpen
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 memberOpenDocuments
Returns a list of currently open Rhino documents
Public methodStatic memberOpenFile Obsolete.
Public methodStatic memberReadFile
Public methodReadFileVersion
Returns the file version of the current document. Use this function to determine which version of Rhino last saved the document.
Public methodSetCustomMeshingParameters
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 methodToString (Inherited from Object.)
Public methodWriteFile
Public eventStatic memberActiveDocumentChanged
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 memberAddRhinoObject
Called if a new object is added to the document.
Public eventStatic memberCode exampleBeforeTransformObjects
Called before objects are being transformed
Public eventStatic memberBeginOpenDocument
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 eventStatic memberBeginSaveDocument
Public eventStatic memberCloseDocument
Public eventStatic memberDeleteRhinoObject
Called if an object is deleted. At some later point the object can be un-deleted.
Public eventStatic memberDeselectAllObjects
Called when all objects are deselected.
Public eventStatic memberDeselectObjects
Called when object(s) are deselected.
Public eventStatic memberDimensionStyleTableEvent
Called when any modification happens to a document's dimension style table.
Public eventStatic memberDocumentPropertiesChanged
Public eventStatic memberEndOpenDocument
Public eventStatic memberEndOpenDocumentInitialiViewUpdate
This event is raised after EndOpenDocument when the documents initial views have been created and initialized.
Public eventStatic memberEndSaveDocument
Public eventStatic memberGroupTableEvent
Called when any modification happens to a document's group table.
Public eventStatic memberInstanceDefinitionTableEvent
Called when any modification happens to a document's light table.
Public eventStatic memberLayerTableEvent
Called when any modification happens to a document's layer table.
Public eventStatic memberLightTableEvent
Called when any modification happens to a document's light table.
Public eventStatic memberMaterialTableEvent
Called when any modification happens to a document's material table.
Public eventStatic memberModifyObjectAttributes
Called when all object attributes are changed.
Public eventStatic memberNewDocument
Public eventStatic memberPurgeRhinoObject
Called if an object is being purged from a document. The object will cease to exist forever.
Public eventStatic memberRenderEnvironmentTableEvent
Public eventStatic memberRenderMaterialsTableEvent
Public eventStatic memberRenderTextureTableEvent
Called when the RenderTextureTable has been loaded, is about to be cleared or has been cleared. See RhinoDocRenderContentTableEventType for more information.
Public eventStatic memberReplaceRhinoObject
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 memberSelectObjects
Called when object(s) are selected.
Public eventStatic memberTextureMappingEvent
Called when any modification happens to a document objects texture mapping.
Public eventStatic memberUndeleteRhinoObject
Called if an object is un-deleted.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.4
See Also