Click or drag to resize

GH_ComponentParamServer Class

Wraps all members and functions needed for GH_Component to manage its input and output parameters.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_ComponentParamServer

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_ComponentParamServer : GH_ISerializable, 
	IEnumerable<IGH_Param>

The GH_ComponentParamServer type exposes the following members.

Properties
  NameDescription
Public propertyInput
Gets or sets the input list of parameters. Do not insert or remove parameters from this list, use the dedicated functions instead.
Public propertyInputWidth
Gets the width of the largest input parameter.
Public propertyOnlyTreeAndListParameters
Returns True if every input parameter is either a list or a tree parameter.
Public propertyOnlyTreeParameters
Returns True if every input parameter is a tree parameter.
Public propertyOutput
Gets or sets the output list of parameters. Do not insert or remove parameters from this list, use the dedicated functions instead.
Public propertyOutputWidth
Gets the width of the largest output parameter.
Public propertyOwner
Gets the owner component of this instance
Top
Methods
  NameDescription
Public methodAccessCount
Returns the total number of input parameters that match the access mask.
Public methodClear
Removes all input and output parameters.
Public methodClear(Boolean)
Removes all input and output parameters.
Public methodStatic memberCreateDuplicate
Attempts to duplicate a parameter. Attributes will be ignored. Warning! The duplicate will have the same ID as the original!
Public methodEmitSyncObject
Create a synch object that stores a shallow representation of this server. Cache this object if you're planning to make sweeping changes to this param-server. Then, once you are finished call the Sync() function to perform cleanup of removed parameters. This is a utility function and you can choose to perform cleanup yourself.
Public methodFind
Find the parameter that has the given InstanceGuid.
Public methodGetEnumerator
Gets a customized enumerator which iterates over all (both input and output) parameters.
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetHashCode(GH_ParamHashFields)
Creates a SHA1 hash from the parameter data.
Public methodIndexOfInputParam(Guid)
Finds the index of the input parameter that matches the specified search mask.
Public methodIndexOfInputParam(String)
Finds the index of the input parameter that matches the specified search mask.
Public methodIndexOfOutputParam(Guid)
Finds the index of the output parameter that matches the specified search mask.
Public methodIndexOfOutputParam(String)
Finds the index of the output parameter that matches the specified search mask.
Public methodStatic memberInventUniqueNickname(String, IEnumerableIGH_Param)
Create a new, unique parameter name.
Public methodStatic memberInventUniqueNickname(String, IEnumerableString)
Create a new, unique parameter name.
Public methodIsInputParam
Returns True if this parameter is an input child of the component
Public methodIsOutputParam
Returns True if this parameter is an output child of the component
Public methodIsParam
Returns True if this parameter is a child of the component
Public methodOnParametersChanged
Call this function when you change input/output parameter lists or types. This function will wipe all caches that are potentially invalid. PerformLayout on the component attributes will be called.
Public methodRead
Read all parameter data from an IO archive.
Public methodRegisterInputParam(IGH_Param)
Add a parameter to the end of the input list.
Public methodRegisterInputParam(IGH_Param, Int32)
Add a parameter at the specific index of the input list.
Public methodRegisterOutputParam(IGH_Param)
Add a parameter to the end of the output list.
Public methodRegisterOutputParam(IGH_Param, Int32)
Add a parameter at the specific index of the output list.
Public methodRepairParamAssociations
Makes sure all parameter attributes are a-ok. If you stick to regular functions, you shouldn't have to call this.
Public methodRepairProxyParams
Attempt to fix all proxy params. Returns false if a single one fails.
Public methodSortInput(Double)
Sort the input parameter order based on a numeric key array.
Public methodSortInput(Int32)
Sort the input parameter order based on a numeric key array.
Public methodSortInput(Single)
Sort the input parameter order based on a numeric key array.
Public methodSortOutput(Double)
Sort the input parameter order based on a numeric key array.
Public methodSortOutput(Int32)
Sort the output parameter order based on a numeric key array.
Public methodSortOutput(Single)
Sort the output parameter order based on a numeric key array.
Public methodSync(Object)
Sync changes from a prerecorded state. All param references in the sync object which are no longer present in the current server will be properly deleted. The sync object will be reset in the process, so you can only call this function with a specific Sync object once.
Public methodSync(GH_ComponentParamServerIGH_SyncObject)
Sync changes from a prerecorded state. All param references in the sync object which are no longer present in the current server will be properly deleted. The sync object will be reset in the process, so you can only call this function with a specific Sync object once.
Public methodSync(GH_ComponentParamServerIGH_SyncObject, Int32)
Sync changes from a prerecorded state. All param references in the sync object which are no longer present in the current server will be properly deleted. The sync object will be reset in the process, so you can only call this function with a specific Sync object once.
Public methodUnregisterInputParameter(IGH_Param)
Removes the specified parameter from this component.
Public methodUnregisterInputParameter(IGH_Param, Boolean)
Removes the specified parameter from this component.
Public methodUnregisterOutputParameter(IGH_Param)
Removes the specified parameter from this component.
Public methodUnregisterOutputParameter(IGH_Param, Boolean)
Removes the specified parameter from this component.
Public methodUnregisterParameter(IGH_Param)
Removes the specified parameter from this component.
Public methodUnregisterParameter(IGH_Param, Boolean)
Removes the specified parameter from this component.
Public methodWrite
Write all parameter data to an IO archive.
Public methodStatic memberWriteParamHashData
Write parameter data to a binary writer.
Top
Events
  NameDescription
Public eventParameterChanged
Raised whenever there is a change to any parameter. If you only care about NickName or Source changes, handle the ParameterNickNameChanged or ParameterSourcesChanged events instead.
Public eventParameterNickNameChanged
Raised whenever a parameter nickname change is accepted.
Public eventParameterSourcesChanged
Raised whenever the source list of an input parameter is changed.
Top
See Also