Click or drag to resize

GH_DocumentIO Class

Provides basic IO operations for GH_Documents.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_DocumentIO

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public sealed class GH_DocumentIO

The GH_DocumentIO type exposes the following members.

Constructors
  NameDescription
Public methodGH_DocumentIO
Create a new instance of GH_DocumentIO without an internal document.
Public methodGH_DocumentIO(GH_Document)
Create a new instance of GH_DocumentIO with an internal document.
Top
Properties
  NameDescription
Public propertyStatic memberDisableOverwriteProtection
Gets or sets whether the file overwrite protection dialog ought to be shown during risky saves.
Public propertyDocument
Gets or sets the internal document.
Public propertyIsDocument
Gets a value indicating whether or not this instance of GH_DocumentIO contains an internal document.
Public propertyLocalClipboardContent
Gets the contents of the local clipboard.
Top
Methods
  NameDescription
Public methodClearClipboard
Clear the Clipboard Text content. This function wipes both the Text and UnicodeText clipboard fields.
Public methodCopy(GH_ClipboardType)
Copy the internal document into the clipboard.
Public methodCopy(GH_ClipboardType, Boolean)
Copy the internal document into the clipboard.
Public methodCopy(GH_ClipboardType, IEnumerableGuid)
Copy the specified objects in the internal document into the clipboard.
Public methodStatic memberGetDocumentIcon
Try and extract the icon image of a document. Not all gh/ghx files contain an icon so this function may return null. The document itself is not loaded and rendered, so the icon really has to be part of the file already.
Public methodStatic memberGetDocumentThumbnail
Try and extract the preview image of a document. Not all gh/ghx files contain a thumbnail so this function may return null. The document itself is not loaded and rendered, so the thumbnail really has to be part of the file already.
Public methodOpen
Perform a default Open operation and store the result as the internal document.
Public methodOpen(String)
Open the file at the given location.
Public methodOpenDocumentDialog
Display the Open GH/GHX dialog.
Public methodPaste
Deserialize a Grasshopper document from the clipboard. On success, the internal document of this GH_DocumentIO instance will be set.
Public methodSave
Perform a default Save operation on the internal document.
Public methodSaveAs
Perform a default Save As operation on the internal document.
Public methodSaveAsCopyDocumentDialog
Display the Save As Copy GH/GHX dialog.
Public methodSaveAsDocumentDialog
Display the Save As GH/GHX dialog.
Public methodSaveBackup
Save a time-stamped copy of the current file.
Public methodSaveDocumentDialog
Display the Save GH/GHX dialog.
Public methodSaveQuiet
Quietly save a file to a given location.
Public methodStatic memberShowOverwriteDialog(String)
Public methodStatic memberShowOverwriteDialog(String, DateTime, DateTime)
Public methodStatic memberSubsidiaryDocumentSavePrompt(GH_Document)
Display a 'stuff has changed do you want to save' message box with Yes/No/Cancel options.
Public methodStatic memberSubsidiaryDocumentSavePrompt(String, Boolean, Int32)
Display a 'stuff has changed do you want to save' message box with Yes/No/Cancel options.
Top
See Also