Click or drag to resize

GH_ComponentServer Class

Maintains proxies for all components, parameters and other object types as defined in all grasshopper assemblies.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_ComponentServer

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

The GH_ComponentServer type exposes the following members.

Constructors
  NameDescription
Public methodGH_ComponentServer
Initializes a new instance of the GH_ComponentServer class
Top
Properties
  NameDescription
Public propertyAliases
Gets a list of all the defined aliases.
Public propertyCompleteRibbonLayout
Gets the default component layout featuring all non-hidden components and parameters.
Public propertyDiscardedProxies
Returns the total number of IGH_DocumentObjects that were discarded during assembly parsing. This includes both skipped and replaced proxies.
Public propertyGraphProxies
Returns a list of all cached GH_GraphProxy instances.
Public propertyLibraries
Returns a list of Assembly Info objects describing all loaded assemblies.
Public propertyLoadingExceptions
Gets a list of all the exceptions that were recorded during the most recent loading sequence.
Public propertyStatic memberNoLoadExtension
Public propertyObjectProxies
Returns a list of all cached GH_ObjectProxy instances.
Public propertyObjectProxyNames
Returns a specialized string collection of all component names.
Public propertyTypeHints
Gets a list of all IGH_TypeHint types in all loaded assemblies.
Public propertyUpgraders
Gets a list of all the upgraders that have been cached.
Top
Methods
  NameDescription
Public methodAddAlias
Add an alias to a target.
Public methodAddCategoryIcon
Add an icon for a tab category. 16x16 images are required.
Public methodAddCategoryShortName
Add an abbreviation for a tab category. 2~4 letter abbreviations are best.
Public methodAddCategorySymbolName
Add a single char category description.
Public methodAliasTargets
Get all the target Component IDs for a given alias.
Public methodClear
Clear all caches.
Public methodClearStaleUserObjects
Remove all user objects that no longer point to existing files.
Public methodStatic memberCompareProxies
Compare two object proxies. Names and exposures are taken into account.
Public methodStatic memberCopyFileToAppropriateFolder
Copy a GHA or GHUSER file into the appropriate Roaming Application Data folder. Of the file is already in the top-level roaming folder it will not be copied.
Public methodCreateComponentPalette
Public methodDestroyLoadingUI
Destroy the loading UI (the banner and the progress bar).
Public methodEmitGraph
Create a new instance of the IGH_Graph that matches the id. If no proxy can be matched to the id, a null reference will be returned.
Public methodEmitObject
Create a new instance of the IGH_DocumentObject that matches the id. If no proxy can be matched to the id, a null reference will be returned.
Public methodEmitObjectIcon
Get the icon that is associated with the given Object ID.
Public methodEmitObjectProxy
Get the proxy that is associated with the given Object ID.
Public methodStatic memberExternalFiles
Get lists of all the external files (GHA, GHUSER and GHCLUSTER) that will be loaded by Grasshopper. Note: this does not equal the files that may already have been loaded, just the files that we'll attempt to load if we were asked to load all plugins now. The list contains no duplicate file paths, but it may contain identical files which won't be filtered until actual loading.
Public methodFindAssembly
Gets the assembly that corresponds to the given library ID.
Public methodFindAssemblyByObject(Guid)
Gets the assembly that corresponds to the given library ID.
Public methodFindAssemblyByObject(IGH_DocumentObject)
Gets the assembly that corresponds to the given library ID.
Public methodFindObjectByName
Find an object by name. Obsolete and hidden objects are ignored. Only exact matches are included.
Public methodFindObjects(Guid)
Find all the objects that are part of a certain library.
Public methodFindObjects(String, Int32, IGH_ObjectProxy, Double)
Searches the list of cached object proxies for objects that might be implied by a search term.
Public methodFindUpgrader
Find the upgrader that can convert from the given target.
Public methodGetAlias
Gets the alias display string for a given object.
Public methodGetCategoryIcon
Get the icon for a specific category. If the icon hasn't been defined, this method will return the default icon.
Public methodGetCategoryShortName
Get the abbreviation (short name) for a specific category. If the short name hasn't been defined, this method will return the full name instead.
Public methodGetCategorySymbolName
Get the single char representation for a specific category. If the char hasn't been defined, this method will return the first char of the full name instead.
Public methodIsGraphCached
Tests the graph cache for an existing graph type ID.
Public methodIsObjectCached
Tests the caches for an existing object type ID.
Public methodIsUpgrader
Checks to see if at least one upgrader is defined for a collection of objects.
Public methodLoadAliases
Load the Alias table from the settings directory. Only use this function if you suspect the alias table settings file has changed due to some external process.
Public methodStatic memberNewUserObject
Create a new UserObject and write it to the Grasshopper User Object folder.
Public methodRemoveCachedGraph
Remove a cache entry from the graph cache. This cannot be undone.
Public methodRemoveCachedObject(Guid)
Remove a cache entry from the object cache. This cannot be undone.
Public methodRemoveCachedObject(String)
Remove the user object (if any) that loads itself from a specified *.ghuser file.
Public methodSaveAliases
Save the alias table to the settings directory. Use this function if you change the alias table while ignoring usual channels.
Public methodSetAlias
Sets the aliases for a given target.
Public methodStatic memberUpdateRibbonUI
Forces an update of the Ribbon control on the Grasshopper main form.
Top
Events
  NameDescription
Public eventGHAFileLoaded
Raised whenever a GHA file has been successfully loaded.
Top
See Also