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.
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
Parameters:
| document (GH_Document) | Document to add. |
| success (ref bool) |
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
Parameters:
| document (GH_Document) | Document to add. |
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.
Contains
#Gets a value indicating whether or not the given document is inside the list.
Parameters:
| doc (GH_Document) |
GetEnumerator
#GetEnumerator_Generic
#IndexOf
#Gets the index of the given document.
Parameters:
| doc (GH_Document) | Document to search for. |
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.
Parameters:
| filepath (string) | File path URI to match. |
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.
Parameters:
| autoSavePath (string) | The full path (directory, filename and extension) of the autosave file to test against. |
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.
Parameters:
| document (GH_Document) | Document to promote. |
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.
Parameters:
| document (GH_Document) | Document to remove. |
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.
Parameters:
| document (GH_Document) | Document to remove. |
Returns: True if the document was removed, false if otherwise.