ComponentFunctionInfo
ReferencesDefines the base class for a function representing a component. This class is abstract.
Constructors
ComponentFunctionInfo
#Instantiates a new instance of the function class. This is not meant for public consumption.
protected ComponentFunctionInfo()
name,
Name.
namespace,
Namespace.
description,
Description.
inputNames,
Input parameter names.
inputDescriptions,
Input parameter descriptions.
inputTypeNames,
Input parameter type names.
inputsOptional,
Indications for optional inputs.
outputNames,
Output names.
outputDescriptions,
Output descriptions.
outputTypeNames,
Output type names.
componentGuid
Component guid.
Properties
The unique identifier of the Grasshopper component. It is the original developer's responsibility to ensure that this ID is unique.
Returns a delegate that can be directly invoked using a list of arguments. This flattens trees.
Returns a delegate that can be directly invoked using a list of arguments. This flattens trees.
Returns a delegate that can be directly invoked using a list of arguments. This considers trees and simplifies single-output components.
Returns a delegate that can be directly invoked using a list of arguments. This considers trees and simplifies single-output components.
Returns the name of the component prefixed by, if existing, the namespace.
Shows the full name of the component, including optional periods. Removes spaces and common operator signs.
The function input parameter descriptions.
The function input parameter names.
Indications for each function input parameter whether it is optional.
The function input type names.
Grasshopper returns several items in general. This property returns the output descriptions.
Grasshopper returns several items in general. This property returns the output names.
Grasshopper returns several items in general. This property returns the output type names.
Methods
Evaluates the component with a set of arguments. There needs to be an argument for each input param, and each output param gives an entry in the output array.
public abstract object[] Evaluate()
args,
The arguments list. Each item is assigned to each input param, in order.
keepTree,
A value indicating whether trees should be considered valid inputs, and should be returned. In this case, output variables are not simplified to common types.
warnings
A possible list of warnings, or null.
Remarks: For component that store no state, this method is thread safe.
Returns: An array of objects, each representing an output result.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to false, and raises an exception on the first warning.
Returns: Items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to true and raises an exception on the first warning.
Returns: Items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to true, and discards warnings (this is a dangerous operation!).
Returns: Array of items.
Runs Evaluate(IEnumerable, bool, string[]) with keepTree equal to false, then simplifies output with SimplifyTreeOutput(object[], string[], bool) and discards warnings (this is a dangerous operation!).
Returns: Items.
ToString
#Returns a string representing this function.
Returns: The namespace and the name.
Overrides: Object.ToString