Properties
Indexers
Methods
AddDocument
#Add a new document to the global list. If there already is a document with the given path, it will be made active.
public GH_Document AddDocument()
filepath,
Filepath to document.
makeActive
If true, the document will be loaded into the main canvas.
Returns: The document that was added or activated, or null on failure.
AddDocument
#Add a new document to the global list. If the document is already registered nothing will happen. This also applies to a different document which points to the same file path
Exceptions:
| ArgumentNullException | Thrown when the document is a null reference. |
| InvalidOperationException | Thrown when the document doesn't have top-level rank. |
AddDocument
#Add a new document to the global list. If the document is already registered nothing will happen. This also applies to a different document which points to the same file path
Exceptions:
| ArgumentNullException | Thrown when the document is a null reference. |
| InvalidOperationException | Thrown when the document doesn't have top-level rank. |
AddNewDocument
#Adds a new document to the global list. If a template file has been set, this document will be based on the template.
Returns: The document thaw was added.
GetEnumerator
#GetEnumerator_Generic
#IndexOf
#Gets the index of the given document.
Returns: The index of the given document or -1 if the document is not in the global list.
IndexOf
#Gets the index of the document that matches the filepath.
Returns: The index of the document that matches the given path or -1 if no document match is found.
IndexOfAutoSave
#Gets the document index that is associated with the specified autosave location.
Returns: The index of the document that matches the given autosave path or -1 if no document match is found.
PromoteDocument
#Push a document to the top of the list, meaning it will be first in line when a new default document needs to be selected.
RemoveDocument
#Removes a specific document from the global list. If the document isn't registered nothing will happen. If the document is owned by an IGH_DocumentOwner, the owner will be informed of the removal.
SafeRemoveDocument
#Remove a document correctly from the server. This method shows user-interface prompts if there is unsaved data and will also save if needed.
Returns: True if the document was removed, false if otherwise.