GH_Document Methods |
The GH_Document type exposes the following members.
Name | Description | |
---|---|---|
ActiveObjects |
Returns all normal objects in the document that implement the IGH_ActiveObject interface
| |
AddObject |
Add a new object to the document. If the object is already contained, nothing will happen
| |
AlignObjects(GH_Align, GH_Distribute) |
Perform alignment and distribution logic on all selected objects.
| |
AlignObjects(GH_Align, GH_Distribute, ListIGH_DocumentObject) |
Perform alignment and distribution logic on a set of objects.
| |
AppendToDebugLog |
Useful for creating textual representations of this document for debugging purposes.
| |
ArrangeObject |
Rearrange the stack order of the object.
| |
ArrangeObjects |
Rearrange the stack order of a collection of objects.
| |
AssociateWithRhinoDocument |
Associate this GH_Document with the currently active Rhino document.
This only works if both the 3dm and the ghx file have been saved at least once.
| |
AutoLayoutComponents |
Perform automatic layout on this document.
| |
AutoSave(GH_AutoSaveTrigger) |
Creates a new autosave file on the disk. The previous autosave file (assuming it exists)
will be temporarily renamed and eventually deleted entirely.
Note: AutoSave is only possible on Documents that have TopLevel Rank and a valid FilePath.
| |
AutoSave(GH_AutoSaveTrigger, Guid) |
Creates a new autosave file on the disk. The previous autosave file (assuming it exists)
will be temporarily renamed and eventually deleted entirely.
Note: AutoSave is only possible on Documents that have TopLevel Rank and a valid FilePath.
| |
AutoSaveFileName |
Computes the autosave filename for a full grasshopper filepath.
| |
BoundingBox |
Returns the boundingbox of all the normal attributes. If the document contains no
normal attributes an Empty RectangleF structure is returned.
| |
BringSelectionToTop |
Move the selection set to the top of the visible stack
| |
ClearIgnoreList |
Clears the Object Exception Ignore List.
| |
ClearReferenceTable |
Destroys the Referenced object table in the Rhino event watcher.
You must call this function if you either add or remove a reference
to a Rhino object.
| |
CloseAllSubsidiaries |
Iterate over all subsidiary documents and close them all without saving.
| |
ClusterInputHooks |
Gets a sorted list of all the cluster input hooks.
| |
ClusterInstanceCount |
Counts the number of instances of a specific cluster document ID.
| |
ClusterOutputHooks |
Gets a sorted list of all the cluster output hooks.
| |
CompareTo |
Compare two documents. This function does not compare document content.
| |
ConstructDocumentTree |
Create a hierarchical document tree of ownership with this document as the root.
| |
ContainsClusterHooks |
Tests whether this document contains at least one cluster hook.
| |
ConvertFullNamesToNickNames |
Convert all nicknames to original nicknames if they are equal to the default full name.
There will be no undo record associated with this operation.
| |
ConvertNickNamesToFullNames |
Convert all nicknames to full names, if they are equal to the default nickname.
There will be no undo record associated with this operation.
| |
CreateAutomaticClusterHooks |
Add an input hook for every non-optional input parameter
with no persistent data and no sources. Then add an output hook for
every floating parameter without recipients, and for every
first component output parameter where the parent component has no recipients.
| |
CreateConnectivityDiagram |
Gets the connectivity diagram for the current state of this document.
| |
CreateExpressionParser |
Create a new Expression Solver preloaded with the constants defined in this document.
| |
DefineConstant |
Add a new constant to the document. Constants are not case-sensitive,
when you define a constant with an existing name, the old one will be replaced.
Note: constants are as of yet unused. Eventually they are supposed to become accessible
to all expressions running inside a document.
| |
DeselectAll |
Deselect all top-level attributes.
| |
DestroyAttributeCache |
Destroys the Attribute cache. Call this function whenever you do something which might affect attributes.
| |
DestroyAutoSaveFiles |
Destroys all autosave files and backup files that are associated with this document.
Only call this function when you are certain that the document has been properly
saved and no changes have occured since.
| |
DestroyObjectTable |
Erase the Object fast lookup table. You must call this whenever you add or remove
objects to or from the document while circumventing the regular channels.
| |
DestroyPreviewCaches |
Wipe all caches for Viewport Preview logic.
| |
DestroyPreviewMeshes |
Attempts to destroy all the preview meshes in this document.
It might not work for all objects, but this is still your best bet.
| |
DestroyProxySources |
Remove all remaining proxy sources from the document.
| |
DisabledObjects |
Returns all disabled objects in the document
| |
Dispose |
When you discard documents you must call Dispose or the Viewport Display event handlers will not be disconnected.
| |
DuplicateDocument |
Attempt to duplicate a document.
| |
EnabledObjects |
Returns all enabled objects in the document
| |
ExpandSelection |
Grow or shift the selection set based on source and recipient links
| |
ExpirePreview |
Expires the preview caches of the conduit.
| |
ExpireSolution |
Expire the entire solution. This will blank all objects.
| |
FilterActive |
Filter a list of objects.
| |
FilterDisabled |
Filter a list of objects.
| |
FilterEnabled |
Filter a list of objects.
| |
FilterInactive |
Filter a list of objects.
| |
FilterObjects(GH_Filter, GH_Filter, GH_Filter) |
Returns all objects in the document that pass the filter specification
| |
FilterObjects(ListIGH_DocumentObject, GH_Filter, GH_Filter, GH_Filter) |
Filter a list of objects using several filters at once
| |
FilterSelected |
Filter a list of objects.
| |
FilterUnselected |
Filter a list of objects.
| |
FindAllDownstreamObjects(IGH_ActiveObject) |
Find all objects that depend in some way on the Source.
| |
FindAllDownstreamObjects(ListIGH_ActiveObject) |
Find all objects that depend in some way on the Source collection
| |
FindAllDownstreamObjects(IGH_ActiveObject, GH_DocumentGH_ActiveObjectFilter) |
Find all objects that depend in some way on the Source.
| |
FindAllDownstreamObjects(ListIGH_ActiveObject, GH_DocumentGH_ActiveObjectFilter) |
Find all objects that depend in some way on the Source collection
| |
FindAttribute(Guid) |
Find the object that matches the ID
| |
FindAttribute(PointF, Boolean) |
Search for attributes that contain a certain point.
| |
FindAttributeByGrip(PointF, Boolean, Int32) |
Search for attributes that contain grips near the search locus
| |
FindAttributeByGrip(PointF, Boolean, Boolean, Boolean, Int32) |
Search for attributes that contain grips near the search locus
| |
FindClusters(Guid) |
Find all the clusters that have a matching ID.
| |
FindClusters(String) |
Find all the clusters that have a matching filepath.
| |
FindComponent(Guid) |
Search for components using an ID filter
| |
FindComponent(Point) |
Search for components that contain the locus
| |
FindFloatingParameter |
Search for floating parameters that contain the locus
| |
FindInputParameter |
Search for input (upstream) parameters that contain the locus
| |
FindObject(Guid, Boolean) |
Find the object that matches the ID.
| |
FindObject(PointF, Single) |
Find the topmost object that is closest to the point
| |
FindObjectT(Guid, Boolean) |
Find the object that matches the ID.
| |
FindObjects |
Find the objects in the document that match the search term.
Top level object names and nicknames are searched, as well as descriptions.
Some objects are special cased to allow for more targeted searches.
Data descriptions are not searched.
| |
FindOutputParameter |
Search for output (downstream) parameters that contain the locus
| |
FindParameter |
Search for parameters using an ID filter
| |
FindWireAt |
Find the wire at or near the given coordinate.
| |
ForcePreview |
If true, the document will draw viewport previews regardless of other
conditions. Typically a document only previews if it is loaded in the canvas
or when it has an RCP.
| |
GetAllInstanceIDs |
Get a sorted list of all the IGH_DocumentObject instance IDs in this document.
| |
InactiveObjects |
Returns all objects in the document that don't implement the IGH_ActiveObject interface
| |
InvertSelection |
Invert the selected state of all top-level attributes.
| |
IsEscapeKeyDown |
Gets whether the escape key was pressed since the last time this function was called.
Though in reality the actual escape state is checked no more than once every
50 milliseconds or so, which should be sufficient for a smooth user experience.
| |
IsRenderMeshPipelineViewport |
Test to see whether a pipeline should have custom render meshes vs. previews.
| |
MergeDocument(GH_Document) |
Hoist all objects from another document into this one.
| |
MergeDocument(GH_Document, Boolean) |
Hoist all objects from another document into this one.
| |
MergeDocument(GH_Document, Boolean, Boolean) |
Hoist all objects from another document into this one.
| |
Modified |
Sets the modified flag of this document.
| |
MutateAllIds |
Change all the instance UUIDs of all objects in the document.
Be sure to resolve all proxy sources before mutating IDs.
This function will ensure all groups are updated appropriately.
| |
NewSolution(Boolean) |
Start a new solution.
| |
NewSolution(Boolean, GH_SolutionMode) |
Start a new solution.
| |
NonBlankFilter |
This delegate can be used in the FindAllDownstreamObjects(...) methods. Only includes objects that are non-blank and non-failed.
| |
NullFilter |
This delegate can be used in the FindAllDownstreamObjects(...) methods. Includes all objects.
| |
OnContextChanged |
Raise the ContextChanged event.
| |
OnEnabledChanged |
Raise the EnabledChanged event.
| |
OnFilePathChanged |
Raise the FilePathChanged event.
| |
OnModifiedChanged |
Raise the ModifiedChanged event
| |
OnObjectAdded |
Raise the ObjectsAdded event.
| |
OnObjectDeleted |
Raise the ObjectsDeleted event.
| |
OnObjectsAdded |
Raise the ObjectsAdded event.
| |
OnObjectsDeleted |
Raise the ObjectsDeleted event.
| |
OnSettingsChanged |
Raise the SettingsChanged event.
| |
OnUndoStateChanged |
Raise the UndoStateChanged event.
| |
PreviewCurrentMeshParameters |
Gets the currently relevant meshing parameters (do not modify the instance as it may be shared).
| |
Read |
Standard archiving function. Will deserialize the entire document.
| |
Redo |
Perform the first redo event.
| |
RelevantObjectAtPoint(PointF) |
Find the most relevant object at a given canvas location.
The most relevant object might be a regular Object (Component or Parameter),
it might be an attribute grip, an attribute balloon, a wire or a group.
| |
RelevantObjectAtPoint(PointF, GH_RelevantObjectFilter) |
Find the most relevant object at a given canvas location.
The most relevant object might be a regular Object (Component or Parameter),
it might be an attribute grip, an attribute balloon, a wire or a group.
| |
RemoveObject(IGH_Attributes, Boolean) |
Remove the top-level object in the attribute tree from the document.
This method does not add an Undo event, that is the responsibility of the caller.
| |
RemoveObject(IGH_DocumentObject, Boolean) |
Remove the object from the document. This removal is the precursor to object deletion.
Do not call this function if you intend to transfer the object to another GH_Document.
This method does not add an Undo event, that is the responsibility of the caller.
| |
RemoveObjects |
Remove the specified objects from the document. This removal is the precursor to object deletion.
Do not call this function if you intend to transfer the objects to another GH_Document.
This method does not add an Undo event, that is the responsibility of the caller.
| |
RemoveSelection |
Delete all the objects in the selection set.
This method does not record an Undo event, that is the responsibility of the caller.
| |
RepairProxySources |
Attempts to resolve all proxy sources in the document.
| |
ReplaceProxySources |
Replace all remaining proxy sources in the document with UnresolvedProxy Objects.
| |
RequestAbortSolution |
Set the requestabort flag. The solution will be aborted whenever the current active object is completed.
It is also possible that active objects themselves implement an abortion mechanism, in which case abortion
might occur even sooner.
| |
RunningAsCommand |
When the document is being solved inside the context of an executing
Rhino command, this function will return the command instance. Under
normal operation of Grasshopper in the traditional sense, this function
will return null. The document executes as a command when inside of the
grasshopper player or as a compiled grasshopper player based command.
The way to run a GH_Document as a command is to call the
GH_RhinoScriptInterface.RunAsCommand function
| |
ScheduleSolution(Int32) |
Schedule a new solution after a specified time interval. The schedule is erased if another solution
is triggered before the schedule is executed. Tight schedules override loose schedules.
If this method is called during a solution, the schedule will be started
after the current solution completes.
| |
ScheduleSolution(Int32, GH_DocumentGH_ScheduleDelegate) |
Schedule a new solution after a specified time interval. The schedule is erased if another solution
is triggered before the schedule is executed. Tight schedules override loose schedules.
If this method is called during a solution, the schedule will be started
after the current solution completes.
| |
Select(GH_RelevantObjectData) |
Default pick selection behaviour. (looks at current Shift + Control modifier states to determine addition/removal)
| |
Select(GH_RelevantObjectData, Boolean, Boolean) |
Default pick selection behaviour
| |
SelectAll |
Select all top-level attributes.
| |
SelectedObjects |
Returns all selected objects in the document
| |
SetEnabledFlags(Boolean) |
Set the enabled flags of all selected objects to true or false
| |
SetEnabledFlags(ListIGH_DocumentObject, Boolean) |
Set the enabled flags of all specified objects to true or false
| |
SetPreviewFlags(Boolean) |
Set the preview flags of all selected objects to true or false
| |
SetPreviewFlags(ListIGH_DocumentObject, Boolean) |
Set the preview flags of all specified objects to true or false
| |
SetStatusBarEventHelper | ||
ShowPreviewSettings |
Display the Preview settings dialog.
| |
SolutionProgress |
Returns the progress of the current solution.
| |
ToggleEnabledFlags |
Toggle the enabled flags of all selected objects
| |
ToggleEnabledFlags(ListIGH_DocumentObject) |
Toggle the enabled flags of all specified objects
| |
TogglePreviewFlags |
Toggle the preview flags of all selected objects
| |
TogglePreviewFlags(ListIGH_DocumentObject) |
Toggle the preview flags of all specified objects
| |
ToString |
A document serializes itself using the filename of the current path.
This is useful for sorting purposes and ListBoxes.
(Overrides ObjectToString.) | |
TranslateObjects |
Offset objects by a certain distance in X and Y
| |
Undo |
Perform the first undo event.
| |
UnselectedObjects |
Returns all unselected objects in the document
| |
UpdateAllSubsidiaries |
Iterate over all subsidiary documents and update them with their respective owners.
If a subsidiary hasn't been modified, it will not be updated and it will not be counted.
| |
Write(GH_IWriter) |
Standard archiving function. Will serialize the entire document.
| |
Write(GH_IWriter, IListIGH_DocumentObject) |
Special function that allows writing of a custom object list.
This function is used when partial documents need to be serialized
such as when exporting or during clipboard operations.
|