Click or drag to resize
RhinoDoc Class
Represents an active model.
Inheritance Hierarchy
SystemObject
  RhinoRhinoDoc

Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public sealed class RhinoDoc

The RhinoDoc type exposes the following members.

Properties
  NameDescription
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 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 propertyDateCreated
Public propertyDateLastEdited
Public propertyCode exampleDimStyles
Public propertyDistanceDisplayPrecision
Public propertyDocumentId Obsolete.
Gets the Document Id.
Public propertyEarthAnchorPoint
Public propertyFonts
Public propertyCode exampleGroups
Public propertyCode exampleHatchPatterns
Public propertyCode exampleInstanceDefinitions
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 propertyIsReadOnly
Current read-only mode for this document. true if the document is 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 propertyLights
Public propertyLinetypes
Linetypes in the document.
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 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 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 propertyRenderSettings
Public propertyRuntimeSerialNumber
Unique serialNumber for the document while the application is running. This is not a persistent value.
Public propertyStrings
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 propertyUndoRecordingEnabled
Public propertyUndoRecordingIsActive
true if undo recording is actually happening now.
Public propertyViews
Top
Methods
  NameDescription
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 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
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from 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 methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetMeshingParameters
Get MeshingParameters currently used by the document
Public methodGetType
Gets the Type of the current instance.
(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
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
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteFile
Top
Events
  NameDescription
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 memberBeforeTransformObjects
Called before objects are being transformed
Public eventStatic memberBeginOpenDocument
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 memberDocumentPropertiesChanged
Public eventStatic memberEndOpenDocument
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 memberReplaceRhinoObject
Called if an object is about to be replaced. If either RhinoDoc::UndoActive() or RhinoDoc::RedoActive() is true, then immediatedly after ReplaceObject is called there will be a call to DeleteObject and then a call to AddObject. If both RhinoDoc::UndoActive() and RhinoDoc::RedoActive() are false, then immediatedly after ReplaceObject is called there will be a call to DeleteObject and then a call to UndeleteObject.
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.
Top
See Also