Skip to content

DiGi.Rhino.Core.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Rhino.Core.Classes Namespace

Classes

Address Class

A Grasshopper component that creates a DiGi.Core.Classes.Address object based on street, city, postal code, and country code inputs.

public class Address : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Address

Constructors

Address() Constructor

Initializes a new instance of the Address component.

public Address();

Properties

Address.ComponentGuid Property

Gets the unique identifier for this Grasshopper component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Address.Exposure Property

Gets the exposure level of the component in the Grasshopper toolbar.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Address.Inputs Property

Gets the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Address.Outputs Property

Gets the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Address.SolveInstance(IGH_DataAccess) Method

Executes the main logic of the component, reading input data and producing an DiGi.Core.Classes.Address output.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The data access object used to retrieve inputs and set outputs.

Component Class

Provides a base abstract class for custom Grasshopper components, extending the standard GH_Component functionality.

public abstract class Component

Inheritance Grasshopper.Kernel.GH_Component → Component

Derived
ElementLogicalFilter
Inspect
VariableParameterComponent

Constructors

Component(string, string, string, string, string) Constructor

Initializes a new instance of the Component class with specified identification and categorization details.

public Component(string name, string nickname, string description, string category, string subCategory);

Parameters

name System.String

The full name of the component.

nickname System.String

The short name displayed on the Grasshopper canvas.

description System.String

A detailed description of the component's functionality.

category System.String

The primary category in the Grasshopper menu where this component is located.

subCategory System.String

The sub-category within the primary category for further organization.

Coordinates Class

Represents a Grasshopper component that creates geographic coordinates from latitude and longitude inputs.

public class Coordinates : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Coordinates

Constructors

Coordinates() Constructor

Initializes a new instance of the Coordinates class.

public Coordinates();

Properties

Coordinates.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Coordinates.Exposure Property

Gets the exposure level of the component, determining when it is executed.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Coordinates.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Coordinates.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Coordinates.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work, processing input latitude and longitude to produce a coordinates object.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object used to retrieve data from inputs and store results in outputs.

CountryCode Class

Represents the country code component used for ISO country identification within the system.

public class CountryCode : DiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.CountryCode>

Inheritance Grasshopper.Kernel.GH_ComponentDiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.CountryCode> → CountryCode

Constructors

CountryCode() Constructor

Initializes a new instance of the CountryCode class.

public CountryCode();

Properties

CountryCode.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Deserialize Class

A Grasshopper component that deserializes JSON strings into a list of serializable objects.

public class Deserialize : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Deserialize

Constructors

Deserialize() Constructor

Initializes a new instance of object.

public Deserialize();

Properties

Deserialize.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Deserialize.Exposure Property

Gets the exposure level of the component, which determines how it is displayed in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Deserialize.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Deserialize.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Deserialize.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

ElementLogicalAndFilter Class

Implementation of a logical AND filter that combines multiple input filters into a single output string.

public class ElementLogicalAndFilter : DiGi.Rhino.Core.Classes.ElementLogicalFilter

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentElementLogicalFilter → ElementLogicalAndFilter

Constructors

ElementLogicalAndFilter() Constructor

Initializes a new instance of the ElementLogicalAndFilter class.

public ElementLogicalAndFilter();

Properties

ElementLogicalAndFilter.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

ElementLogicalAndFilter.Exposure Property

Gets the exposure level of the component.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

ElementLogicalFilter Class

Base abstract class for logical filter components that support a variable number of input parameters.

public abstract class ElementLogicalFilter : DiGi.Rhino.Core.Classes.Component

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponent → ElementLogicalFilter

Derived
ElementLogicalAndFilter

Constructors

ElementLogicalFilter(string, string, string, string, string) Constructor

Initializes a new instance of the ElementLogicalFilter class.

protected ElementLogicalFilter(string name, string nickname, string description, string category, string subCategory);

Parameters

name System.String

The full name of the component.

nickname System.String

The short nickname of the component.

description System.String

A description of what the component does.

category System.String

The category in the Grasshopper menu.

subCategory System.String

The sub-category in the Grasshopper menu.

Methods

ElementLogicalFilter.AddedToDocument(GH_Document) Method

Called when the component is added to a Grasshopper document.

public override void AddedToDocument(GH_Document document);

Parameters

document Grasshopper.Kernel.GH_Document

The document the component is being added to.

ElementLogicalFilter.CanInsertParameter(GH_ParameterSide, int) Method

Determines whether a parameter can be inserted at the specified side and index.

public bool CanInsertParameter(GH_ParameterSide side, int index);

Parameters

side Grasshopper.Kernel.GH_ParameterSide

The side of the component where the parameter would be inserted.

index System.Int32

The zero-based index of the parameter.

Returns

System.Boolean
true if the parameter can be inserted; otherwise, false.

ElementLogicalFilter.CanRemoveParameter(GH_ParameterSide, int) Method

Determines whether a parameter can be removed from the specified side and index.

public bool CanRemoveParameter(GH_ParameterSide side, int index);

Parameters

side Grasshopper.Kernel.GH_ParameterSide

The side of the component where the parameter would be removed.

index System.Int32

The zero-based index of the parameter.

Returns

System.Boolean
true if the parameter can be removed; otherwise, false.

ElementLogicalFilter.CreateParameter(GH_ParameterSide, int) Method

Creates a new parameter for the specified side and index.

public IGH_Param? CreateParameter(GH_ParameterSide side, int index);

Parameters

side Grasshopper.Kernel.GH_ParameterSide

The side of the component where the parameter is created.

index System.Int32

The zero-based index of the parameter.

Returns

Grasshopper.Kernel.IGH_Param
The newly created Grasshopper.Kernel.IGH_Param, or null if creation is not possible.

ElementLogicalFilter.DestroyParameter(GH_ParameterSide, int) Method

Destroys the parameter at the specified side and index.

public bool DestroyParameter(GH_ParameterSide side, int index);

Parameters

side Grasshopper.Kernel.GH_ParameterSide

The side of the component where the parameter is located.

index System.Int32

The zero-based index of the parameter.

Returns

System.Boolean
true if the parameter was successfully destroyed; otherwise, false.

ElementLogicalFilter.RemovedFromDocument(GH_Document) Method

Called when the component is removed from a Grasshopper document.

public override void RemovedFromDocument(GH_Document document);

Parameters

document Grasshopper.Kernel.GH_Document

The document the component is being removed from.

ElementLogicalFilter.VariableParameterMaintenance() Method

Performs maintenance on variable parameters to ensure consistency.

public void VariableParameterMaintenance();

EnumComponent<T> Class

An abstract base class for Grasshopper components that manage a value of a specific enumeration type.

public abstract class EnumComponent<T>
    where T : System.Enum

Type parameters

T

The enumeration type used by the component.

Inheritance Grasshopper.Kernel.GH_Component → EnumComponent<T>

Derived
CountryCode
NumberComparisonType
TextComparisonType
UTC

Constructors

EnumComponent(string) Constructor

Initializes a new instance of the EnumComponent<T> class using a prefix to automatically generate metadata.

public EnumComponent(string prefix);

Parameters

prefix System.String

The prefix used to construct the component's identity and category path.

EnumComponent(string, string, string, string, string) Constructor

Initializes a new instance of the EnumComponent<T> class with specified metadata.

public EnumComponent(string name, string nickname, string description, string category, string subCategory);

Parameters

name System.String

The full name of the component.

nickname System.String

The short nickname of the component.

description System.String

A detailed description of the component's functionality.

category System.String

The primary category in the Grasshopper menu.

subCategory System.String

The sub-category in the Grasshopper menu.

Methods

EnumComponent<T>.AppendAdditionalComponentMenuItems(ToolStripDropDown) Method

Appends the enumeration values of type T as selectable items in the component's context menu.

protected override void AppendAdditionalComponentMenuItems(System.Windows.Forms.ToolStripDropDown menu);

Parameters

menu System.Windows.Forms.ToolStripDropDown

The drop-down menu to which the items are appended.

EnumComponent<T>.Read(GH_IReader) Method

Reads the serialized state of the component from the provided reader.

public override bool Read(GH_IReader reader);

Parameters

reader GH_IO.Serialization.GH_IReader

The reader used to retrieve stored data.

Returns

System.Boolean
True if the read operation was successful; otherwise, false.

EnumComponent<T>.RegisterInputParams(GH_InputParamManager) Method

Registers all the input parameters for this component.

protected override void RegisterInputParams(GH_InputParamManager inputParamManager);

Parameters

inputParamManager Grasshopper.Kernel.GH_Component.GH_InputParamManager

The manager used to register input parameters.

EnumComponent<T>.RegisterOutputParams(GH_OutputParamManager) Method

Registers all the output parameters for this component.

protected override void RegisterOutputParams(GH_OutputParamManager outputParamManager);

Parameters

outputParamManager Grasshopper.Kernel.GH_Component.GH_OutputParamManager

The manager used to register output parameters.

EnumComponent<T>.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

EnumComponent<T>.Write(GH_IWriter) Method

Writes the current state of the component to the provided writer for serialization.

public override bool Write(GH_IWriter writer);

Parameters

writer GH_IO.Serialization.GH_IWriter

The writer used to store data.

Returns

System.Boolean
True if the write operation was successful; otherwise, false.

FilterByMask Class

A component that filters a list of serializable objects based on a provided boolean mask.

public class FilterByMask : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → FilterByMask

Constructors

FilterByMask() Constructor

Initializes a new instance of the FilterByMask class.

public FilterByMask();

Properties

FilterByMask.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

FilterByMask.Exposure Property

Gets the exposure level of the component, which determines its visibility and behavior in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

FilterByMask.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

FilterByMask.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

FilterByMask.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work, filtering the input list based on the provided boolean mask.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object used to retrieve data from inputs and store results in outputs.

FilterByNumber Class

A component that filters a list of serializable objects based on the value of a specified numeric property.

public class FilterByNumber : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → FilterByNumber

Constructors

FilterByNumber() Constructor

Initializes a new instance of the FilterByNumber class.

public FilterByNumber();

Properties

FilterByNumber.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

FilterByNumber.Exposure Property

Gets the exposure level of the component.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

FilterByNumber.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

FilterByNumber.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

FilterByNumber.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work of filtering objects by a numeric property value.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object used to retrieve from inputs and store in outputs.

FilterByText Class

A Grasshopper component that filters a list of serializable objects based on the text value of a specified parameter.

public class FilterByText : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → FilterByText

Constructors

FilterByText() Constructor

Initializes a new instance of the FilterByText class.

public FilterByText();

Properties

FilterByText.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

FilterByText.Exposure Property

Gets the exposure level of the component, which determines its visibility and behavior on the canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

FilterByText.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

FilterByText.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

FilterByText.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work of filtering objects based on text comparison.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The data access object used to retrieve input values and set output values.

GetValue Class

A Grasshopper component that retrieves a value for a given parameter definition from a parametrized object.

public class GetValue : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → GetValue

Constructors

GetValue() Constructor

Initializes a new instance of the GetValue class.

public GetValue();

Properties

GetValue.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GetValue.Exposure Property

Gets the exposure level of this component.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

GetValue.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

GetValue.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

GetValue.SolveInstance(IGH_DataAccess) Method

Performs the main logic of the component, retrieving a value from the parametrized object based on the provided parameter definition.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object used to retrieve from inputs and store in outputs.

GooEnum Class

A non-generic wrapper for enumeration types to be used within the Grasshopper environment.

public class GooEnum : DiGi.Rhino.Core.Classes.GooEnum<System.Enum>

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooEnum<System.Enum> → GooEnum

Constructors

GooEnum() Constructor

Initializes a new instance of the GooEnum class.

public GooEnum();

GooEnum(Enum) Constructor

Initializes a new instance of the GooEnum class with a specific enumeration value.

public GooEnum(System.Enum? @enum);

Parameters

enum System.Enum

The enumeration value.

Methods

GooEnum.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of GooEnum containing the same value.

GooEnum<T> Class

A generic wrapper for enumeration types to be used within the Grasshopper environment.

public class GooEnum<T> : DiGi.Rhino.Core.Interfaces.IGooObject
    where T : System.Enum

Type parameters

T

The type of the enumeration.

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializable → GooEnum<T>

Derived
GooEnum

Implements IGooObject

Constructors

GooEnum() Constructor

Initializes a new instance of the GooEnum<T> class.

public GooEnum();

GooEnum(GooEnum<T>) Constructor

Initializes a new instance of the GooEnum<T> class using an existing GooEnum<T>.

public GooEnum(DiGi.Rhino.Core.Classes.GooEnum<T>? gooEnum);

Parameters

gooEnum DiGi.Rhino.Core.Classes.GooEnum<T>

The source GooEnum object.

GooEnum(T) Constructor

Initializes a new instance of the GooEnum<T> class with a specific enumeration value.

public GooEnum(T? @enum);

Parameters

enum T

The enumeration value.

Properties

GooEnum<T>.IsValid Property

Gets a value indicating whether the current instance contains a valid value.

public override bool IsValid { get; }

Property Value

System.Boolean

GooEnum<T>.TypeDescription Property

Gets a description of the type, replacing dots with spaces for readability.

public override string? TypeDescription { get; }

Property Value

System.String

GooEnum<T>.TypeName Property

Gets the full name of the type.

public override string? TypeName { get; }

Property Value

System.String

Methods

GooEnum<T>.CastFrom(object) Method

Attempts to cast the specified object to a GooEnum<T>.

public override bool CastFrom(object source);

Parameters

source System.Object

The object to cast.

Returns

System.Boolean
True if the casting was successful; otherwise, false.

GooEnum<T>.CastTo<Y>(Y) Method

Attempts to cast the current value to a specified type.

public override bool CastTo<Y>(ref Y target);

Type parameters

Y

The target type.

Parameters

target Y

A reference to the target variable where the result will be stored.

Returns

System.Boolean
True if the casting was successful; otherwise, false.

GooEnum<T>.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of GooEnum<T> containing the same value.

GooEnum<T>.Read(GH_IReader) Method

Reads the enumeration value from a serialization reader.

public override bool Read(GH_IReader? reader);

Parameters

reader GH_IO.Serialization.GH_IReader

The reader used to deserialize the data.

Returns

System.Boolean
True if the read operation was successful; otherwise, false.

GooEnum<T>.ToString() Method

Returns a string representation of the current enumeration value.

public override string? ToString();

Returns

System.String
The string representation of the value, or null if no value is present.

GooEnum<T>.Write(GH_IWriter) Method

Writes the enumeration value to a serialization writer.

public override bool Write(GH_IWriter writer);

Parameters

writer GH_IO.Serialization.GH_IWriter

The writer used to serialize the data.

Returns

System.Boolean
True if the write operation was successful; otherwise, false.

GooEnumParam Class

A Grasshopper parameter component for general enumeration types.

public class GooEnumParam

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooEnumParam

Constructors

GooEnumParam() Constructor

Initializes a new instance of the GooEnumParam class.

public GooEnumParam();

Properties

GooEnumParam.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooEnumParam<T,X> Class

Represents a persistent parameter in Grasshopper that handles enumeration values wrapped in a GooEnum<T>.

public abstract class GooEnumParam<T,X>
    where T : DiGi.Rhino.Core.Classes.GooEnum<X>
    where X : System.Enum

Type parameters

T

The type of the value being stored, which must be a GooEnum<T>.

X

The underlying enumeration type.

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooEnumParam<T,X>

Derived
GooEnumParam<T>

Constructors

GooEnumParam() Constructor

Initializes a new instance of the GooEnumParam<T,X> class.

public GooEnumParam();

Methods

GooEnumParam<T,X>.Prompt_Plural(List<T>) Method

Handles the prompt for multiple values when the parameter is accessed.

protected override GH_GetterResult Prompt_Plural(ref System.Collections.Generic.List<T> values);

Parameters

values System.Collections.Generic.List<T>

A reference to the list of values to be updated.

Returns

Grasshopper.Kernel.GH_GetterResult
The result of the getter operation.

GooEnumParam<T,X>.Prompt_Singular(T) Method

Handles the prompt for a single value when the parameter is accessed.

protected override GH_GetterResult Prompt_Singular(ref T value);

Parameters

value T

A reference to the value to be updated.

Returns

Grasshopper.Kernel.GH_GetterResult
The result of the getter operation.

GooEnumParam<T> Class

A Grasshopper parameter component for generic enumeration types.

public class GooEnumParam<T> : DiGi.Rhino.Core.Classes.GooEnumParam<DiGi.Rhino.Core.Classes.GooEnum<T>, T>
    where T : System.Enum

Type parameters

T

The type of the enumeration.

Inheritance Grasshopper.Kernel.GH_PersistentParamDiGi.Rhino.Core.Classes.GooEnumParam<DiGi.Rhino.Core.Classes.GooEnum<T>,T> → GooEnumParam<T>

Constructors

GooEnumParam() Constructor

Initializes a new instance of the GooEnumParam<T> class.

public GooEnumParam();

Properties

GooEnumParam<T>.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooObject Class

A non-generic version of GooObject<TObject> that wraps an object of type System.Object.

public class GooObject : DiGi.Rhino.Core.Classes.GooObject<object>

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<System.Object> → GooObject

Constructors

GooObject() Constructor

Initializes a new instance of the GooObject class.

public GooObject();

GooObject(object) Constructor

Initializes a new instance of the GooObject class with a specified value.

public GooObject(object? @object);

Parameters

object System.Object

The object to wrap in this Goo container.

Methods

GooObject.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of GooObject containing the same value.

GooObject<TObject> Class

A generic wrapper for objects to be used within Grasshopper, providing serialization and casting capabilities.

public class GooObject<TObject> : DiGi.Rhino.Core.Interfaces.IGooObject<TObject>, DiGi.Rhino.Core.Interfaces.IGooObject

Type parameters

TObject

The type of the object wrapped by this Goo container.

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializable → GooObject<TObject>

Derived
GooObject
GooSerializableObject<TSerializableObject>
GooType

Implements DiGi.Rhino.Core.Interfaces.IGooObject<TObject>, IGooObject

Constructors

GooObject() Constructor

Initializes a new instance of the GooObject<TObject> class.

public GooObject();

GooObject(TObject) Constructor

Initializes a new instance of the GooObject<TObject> class with a specified value.

public GooObject(TObject? @object);

Parameters

object TObject

The object to wrap in this Goo container.

Properties

GooObject<TObject>.IsValid Property

Gets a value indicating whether the wrapped object is valid (not null).

public override bool IsValid { get; }

Property Value

System.Boolean

GooObject<TObject>.TypeDescription Property

Gets a human-readable description of the type of the wrapped object.

public override string? TypeDescription { get; }

Property Value

System.String

GooObject<TObject>.TypeName Property

Gets the full name of the type of the wrapped object.

public override string? TypeName { get; }

Property Value

System.String

Methods

GooObject<TObject>.CastFrom(object) Method

Attempts to cast the specified source object into this Goo container.

public override bool CastFrom(object? source);

Parameters

source System.Object

The source object to cast from.

Returns

System.Boolean
True if the casting was successful; otherwise, false.

GooObject<TObject>.CastTo<Y>(Y) Method

Attempts to cast the wrapped object into the specified target type.

public override bool CastTo<Y>(ref Y target);

Type parameters

Y

The target type to cast to.

Parameters

target Y

A reference to the target variable where the result will be stored.

Returns

System.Boolean
True if the casting was successful; otherwise, false.

GooObject<TObject>.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of Grasshopper.Kernel.Types.IGH_Goo containing the same value.

GooObject<TObject>.GetValue<XObject>() Method

Retrieves the wrapped value cast to a more specific type.

public XObject? GetValue<XObject>()
    where XObject : TObject;

Type parameters

XObject

The specific type to retrieve, which must inherit from TObject.

Implements GetValue<XObject>()

Returns

XObject
The wrapped value as XObject if possible; otherwise, the default value of XObject.

GooObject<TObject>.Read(GH_IReader) Method

Reads the wrapped object from a Grasshopper reader.

public override bool Read(GH_IReader reader);

Parameters

reader GH_IO.Serialization.GH_IReader

The reader used to deserialize the object.

Returns

System.Boolean
True if reading was successful; otherwise, false.

GooObject<TObject>.ToString() Method

Returns a string representation of the wrapped object.

public override string? ToString();

Returns

System.String
The full name of the type of the wrapped value, or null if the value is null.

GooObject<TObject>.Write(GH_IWriter) Method

Writes the wrapped object to a Grasshopper writer.

public override bool Write(GH_IWriter writer);

Parameters

writer GH_IO.Serialization.GH_IWriter

The writer used to serialize the object.

Returns

System.Boolean
True if writing was successful; otherwise, false.

GooObjectParam Class

A Grasshopper persistent parameter for GooObject.

public class GooObjectParam

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooObjectParam

Constructors

GooObjectParam() Constructor

Initializes a new instance of the GooObjectParam class.

public GooObjectParam();

Properties

GooObjectParam.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooParam Class

Represents a Grasshopper parameter that handles generic goo objects (Grasshopper.Kernel.Types.IGH_Goo).

public class GooParam

Inheritance Grasshopper.Kernel.GH_Param → GooParam

Constructors

GooParam() Constructor

Initializes a new instance of the GooParam class with default values and item access.

public GooParam();

GooParam(string, string, string, GH_ParamAccess) Constructor

Initializes a new instance of the GooParam class with specified metadata and access mode.

public GooParam(string name, string nickname, string description, GH_ParamAccess gH_ParamAccess);

Parameters

name System.String

The name of the parameter.

nickname System.String

The nickname of the parameter.

description System.String

The description of the parameter.

gH_ParamAccess Grasshopper.Kernel.GH_ParamAccess

The access mode for the parameter (e.g., Item or List).

Properties

GooParam.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooParam.Exposure Property

Gets the exposure level of the parameter.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Methods

GooParam.GetHashCode() Method

Returns a hash code for the current object based on its name.

public override int GetHashCode();

Returns

System.Int32
A hash code for the current object.

GooParam.Read(GH_IReader) Method

Reads the parameter data from the specified reader.

public sealed override bool Read(GH_IReader reader);

Parameters

reader GH_IO.Serialization.GH_IReader

The reader used to deserialize the object.

Returns

System.Boolean
true if the read operation was successful; otherwise, false.

GooParam.Write(GH_IWriter) Method

Writes the parameter data to the specified writer.

public sealed override bool Write(GH_IWriter writer);

Parameters

writer GH_IO.Serialization.GH_IWriter

The writer used to serialize the object.

Returns

System.Boolean
true if the write operation was successful; otherwise, false.

GooPresistentParam<T,X> Class

Represents a persistent parameter in Grasshopper that manages data of type T, which wraps an underlying object of type X.

public class GooPresistentParam<T,X>
    where T : DiGi.Rhino.Core.Classes.GooObject<X?>
    where X : DiGi.Core.Interfaces.IObject

Type parameters

T

The type of the Goo object, which must inherit from GooObject<TObject>.

X

The type of the underlying data object, which must implement DiGi.Core.Interfaces.IObject.

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooPresistentParam<T,X>

Derived
GooSerializablePresistentParam<T,X>

Constructors

GooPresistentParam() Constructor

Initializes a new instance of the GooPresistentParam<T,X> class using default values derived from type X.

public GooPresistentParam();

GooPresistentParam(string, string) Constructor

Initializes a new instance of the GooPresistentParam<T,X> class with a specified name and subcategory.

public GooPresistentParam(string name, string subcategory);

Parameters

name System.String

The display name of the parameter.

subcategory System.String

The subcategory under which the parameter is listed in the Grasshopper menu.

Properties

GooPresistentParam<T,X>.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Methods

GooPresistentParam<T,X>.Prompt_Plural(List<T>) Method

Prompts the user to supply multiple values of type T.

protected override GH_GetterResult Prompt_Plural(ref System.Collections.Generic.List<T?> values);

Parameters

values System.Collections.Generic.List<T>

The list of values supplied by the user.

Returns

Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the outcome of the prompt.

GooPresistentParam<T,X>.Prompt_Singular(T) Method

Prompts the user to supply a single value of type T.

protected override GH_GetterResult Prompt_Singular(ref T? value);

Parameters

value T

The value supplied by the user.

Returns

Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the outcome of the prompt.

GooSerializableObject Class

Represents a non-generic Goo wrapper for any object implementing DiGi.Core.Interfaces.ISerializableObject.

public class GooSerializableObject : DiGi.Rhino.Core.Classes.GooSerializableObject<DiGi.Core.Interfaces.ISerializableObject>

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<DiGi.Core.Interfaces.ISerializableObject>DiGi.Rhino.Core.Classes.GooSerializableObject<DiGi.Core.Interfaces.ISerializableObject> → GooSerializableObject

Constructors

GooSerializableObject() Constructor

Initializes a new instance of the GooSerializableObject class.

public GooSerializableObject();

GooSerializableObject(ISerializableObject) Constructor

Initializes a new instance of the GooSerializableObject class with a specified serializable object.

public GooSerializableObject(DiGi.Core.Interfaces.ISerializableObject? serializableObject);

Parameters

serializableObject DiGi.Core.Interfaces.ISerializableObject

The serializable object to wrap.

Methods

GooSerializableObject.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of GooSerializableObject containing the same value.

GooSerializableObject<TSerializableObject> Class

Represents a Goo wrapper for an object that implements the DiGi.Core.Interfaces.ISerializableObject interface, allowing it to be passed through Grasshopper wires while maintaining serialization capabilities.

public class GooSerializableObject<TSerializableObject> : DiGi.Rhino.Core.Classes.GooObject<TSerializableObject?>, DiGi.Rhino.Core.Interfaces.IGooSerializableObject<TSerializableObject>, DiGi.Rhino.Core.Interfaces.IGooSerializableObject, DiGi.Rhino.Core.Interfaces.IGooObject, DiGi.Rhino.Core.Interfaces.IGooObject<TSerializableObject?>
    where TSerializableObject : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TSerializableObject

The type of the serializable object.

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<TSerializableObject> → GooSerializableObject<TSerializableObject>

Derived
GooAddress
GooCoordinates
GooParameter
GooParameterDefinition
GooParametrizedObject
GooTimeSeries
GooSerializableObject

Implements DiGi.Rhino.Core.Interfaces.IGooSerializableObject<TSerializableObject>, IGooSerializableObject, IGooObject, DiGi.Rhino.Core.Interfaces.IGooObject<TSerializableObject>

Constructors

GooSerializableObject() Constructor

Initializes a new instance of the GooSerializableObject<TSerializableObject> class.

public GooSerializableObject();

GooSerializableObject(TSerializableObject) Constructor

Initializes a new instance of the GooSerializableObject<TSerializableObject> class with a specified serializable object.

public GooSerializableObject(TSerializableObject? serializableObject);

Parameters

serializableObject TSerializableObject

The serializable object to wrap.

Methods

GooSerializableObject<TSerializableObject>.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new instance of GooSerializableObject<TSerializableObject> containing the same value.

GooSerializableObjectParam Class

A Grasshopper persistent parameter that handles GooSerializableObject types.

public class GooSerializableObjectParam

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooSerializableObjectParam

Constructors

GooSerializableObjectParam() Constructor

Initializes a new instance of the GooSerializableObjectParam class.

public GooSerializableObjectParam();

Properties

GooSerializableObjectParam.ComponentGuid Property

Gets the unique identifier for this component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Methods

GooSerializableObjectParam.AppendAdditionalMenuItems(ToolStripDropDown) Method

Appends additional custom menu items to the parameter's context menu.

public override void AppendAdditionalMenuItems(System.Windows.Forms.ToolStripDropDown menu);

Parameters

menu System.Windows.Forms.ToolStripDropDown

The dropdown menu to append items to.

GooSerializableObjectParam.Menu_SaveAs(object, EventArgs) Method

Handles the "Save As..." menu item click event.

private void Menu_SaveAs(object? sender, System.EventArgs? e);

Parameters

sender System.Object

The source of the event.

e System.EventArgs

The event arguments.

GooSerializableObjectParam.Prompt_Plural(List<GooSerializableObject>) Method

Prompts the user to select multiple values for the parameter.

protected override GH_GetterResult Prompt_Plural(ref System.Collections.Generic.List<DiGi.Rhino.Core.Classes.GooSerializableObject?> values);

Parameters

values System.Collections.Generic.List<GooSerializableObject>

The list of selected values.

Returns

Grasshopper.Kernel.GH_GetterResult
A result indicating whether the operation was successful.

GooSerializableObjectParam.Prompt_Singular(GooSerializableObject) Method

Prompts the user to select a single value for the parameter.

protected override GH_GetterResult Prompt_Singular(ref DiGi.Rhino.Core.Classes.GooSerializableObject? value);

Parameters

value GooSerializableObject

The selected value.

Returns

Grasshopper.Kernel.GH_GetterResult
A result indicating whether the operation was successful.

GooSerializablePresistentParam<T,X> Class

Represents a persistent parameter that handles serializable objects of type T and X.

public class GooSerializablePresistentParam<T,X> : DiGi.Rhino.Core.Classes.GooPresistentParam<T, X>
    where T : DiGi.Rhino.Core.Classes.GooSerializableObject<X>
    where X : DiGi.Core.Interfaces.ISerializableObject

Type parameters

T

The type of the Goo object, which must derive from GooSerializableObject<TSerializableObject>.

X

The underlying serializable data type that implements DiGi.Core.Interfaces.ISerializableObject.

Inheritance Grasshopper.Kernel.GH_PersistentParamDiGi.Rhino.Core.Classes.GooPresistentParam<T,X> → GooSerializablePresistentParam<T,X>

Derived
GooAddressParam
GooCoordinatesParam
GooParameterDefinitionParam
GooParameterParam
GooParametrizedObjectParam
GooTimeSeriesParam

Constructors

GooSerializablePresistentParam() Constructor

Initializes a new instance of the GooSerializablePresistentParam<T,X> class.

public GooSerializablePresistentParam();

GooSerializablePresistentParam(string, string) Constructor

Initializes a new instance of the GooSerializablePresistentParam<T,X> class with a specified name and subcategory.

public GooSerializablePresistentParam(string name, string subcategory);

Parameters

name System.String

The display name of the parameter.

subcategory System.String

The subcategory used for grouping in the Grasshopper interface.

Properties

GooSerializablePresistentParam<T,X>.ComponentGuid Property

Gets the unique identifier for this component type.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Methods

GooSerializablePresistentParam<T,X>.AppendAdditionalMenuItems(ToolStripDropDown) Method

Appends additional custom items to the context menu of the parameter.

public override void AppendAdditionalMenuItems(System.Windows.Forms.ToolStripDropDown menu);

Parameters

menu System.Windows.Forms.ToolStripDropDown

The System.Windows.Forms.ToolStripDropDown menu to which items will be added.

GooSerializablePresistentParam<T,X>.Prompt_Plural(List<T>) Method

Prompts the user to provide multiple values for the parameter.

protected override GH_GetterResult Prompt_Plural(ref System.Collections.Generic.List<T?> values);

Parameters

values System.Collections.Generic.List<T>

A reference to the list of values to be retrieved.

Returns

Grasshopper.Kernel.GH_GetterResult
The result of the getter operation as a Grasshopper.Kernel.GH_GetterResult.

GooSerializablePresistentParam<T,X>.Prompt_Singular(T) Method

Prompts the user to provide a single value for the parameter.

protected override GH_GetterResult Prompt_Singular(ref T? value);

Parameters

value T

A reference to the value to be retrieved.

Returns

Grasshopper.Kernel.GH_GetterResult
The result of the getter operation as a Grasshopper.Kernel.GH_GetterResult.

GooType Class

Represents a Goo wrapper for System.Type, allowing system types to be passed through Grasshopper wires.

public class GooType : DiGi.Rhino.Core.Classes.GooObject<System.Type>, DiGi.Rhino.Core.Interfaces.IGooObject<System.Type>, DiGi.Rhino.Core.Interfaces.IGooObject

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<System.Type> → GooType

Implements DiGi.Rhino.Core.Interfaces.IGooObject<System.Type>, IGooObject

Constructors

GooType() Constructor

Initializes a new instance of the GooType class.

public GooType();

GooType(Type) Constructor

Initializes a new instance of the GooType class with a specified type.

public GooType(System.Type? type);

Parameters

type System.Type

The System.Type to be wrapped in the Goo object.

Methods

GooType.Duplicate() Method

Creates a duplicate of the current Goo object.

public override IGH_Goo? Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new GooType instance containing the same value.

GooTypeParam Class

A Grasshopper parameter used to input and output GooType objects.

public class GooTypeParam

Inheritance Grasshopper.Kernel.GH_PersistentParam → GooTypeParam

Constructors

GooTypeParam() Constructor

Initializes a new instance of the GooTypeParam class.

public GooTypeParam();

Properties

GooTypeParam.ComponentGuid Property

Gets the unique identifier for the GooTypeParam component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Inspect Class

A Grasshopper component that inspects DiGi objects and dynamically generates output parameters based on the input object's serializable properties.

public class Inspect : DiGi.Rhino.Core.Classes.Component

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponent → Inspect

Constructors

Inspect() Constructor

Initializes a new instance of the Inspect component.

public Inspect();

Properties

Inspect.ComponentGuid Property

Gets the unique identifier for this Grasshopper component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Inspect.Exposure Property

Gets the exposure level of the component in the Grasshopper toolbar.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Methods

Inspect.AddedToDocument(GH_Document) Method

Called when this component is added to a Grasshopper document.

public override void AddedToDocument(GH_Document document);

Parameters

document Grasshopper.Kernel.GH_Document

The Grasshopper document to which the component is being added.

Inspect.AppendAdditionalMenuItems(ToolStripDropDown) Method

Appends additional custom menu items to the component's right-click context menu.

public override void AppendAdditionalMenuItems(System.Windows.Forms.ToolStripDropDown menu);

Parameters

menu System.Windows.Forms.ToolStripDropDown

The tool strip dropdown menu to which items are appended.

Inspect.RegisterInputParams(GH_InputParamManager) Method

Registers all input parameters for this component.

protected override void RegisterInputParams(GH_InputParamManager inputParamManager);

Parameters

inputParamManager Grasshopper.Kernel.GH_Component.GH_InputParamManager

The manager used to register input parameters.

Inspect.RegisterOutputParams(GH_OutputParamManager) Method

Registers all output parameters for this component.

protected override void RegisterOutputParams(GH_OutputParamManager outputParamManager);

Parameters

outputParamManager Grasshopper.Kernel.GH_Component.GH_OutputParamManager

The manager used to register output parameters.

Inspect.SolveInstance(IGH_DataAccess) Method

Executes the main logic of the component, reading the input object and setting values on the dynamically generated output parameters.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The data access object used to retrieve inputs and set outputs.

InspectAttribute Class

Attribute used to mark methods for inspection purposes, providing metadata such as name, nickname, and description.

public class InspectAttribute : System.Attribute

Inheritance System.ObjectSystem.Attribute → InspectAttribute

Constructors

InspectAttribute(string, string, string) Constructor

Initializes a new instance of the InspectAttribute class.

public InspectAttribute(string name, string nickname, string description);

Parameters

name System.String

The formal name of the inspection.

nickname System.String

The nickname of the inspection.

description System.String

The description of the inspection.

Properties

InspectAttribute.Description Property

Gets the detailed description of the inspected method.

public string Description { get; }

Property Value

System.String

InspectAttribute.Name Property

Gets the formal name associated with the inspected method.

public string Name { get; }

Property Value

System.String

InspectAttribute.Nickname Property

Gets the nickname or short name associated with the inspected method.

public string Nickname { get; }

Property Value

System.String

InspectManager Class

Manages the discovery and retrieval of inspection methods associated with specific types.

public class InspectManager

Inheritance System.Object → InspectManager

Constructors

InspectManager() Constructor

Initializes a new instance of the InspectManager class.

public InspectManager();

Methods

InspectManager.GetInspectMethods(Type) Method

Retrieves a list of inspection methods that are applicable to the specified type.

public System.Collections.Generic.List<DiGi.Rhino.Core.Classes.InspectMethod>? GetInspectMethods(System.Type? type);

Parameters

type System.Type

The type for which to retrieve inspection methods.

Returns

System.Collections.Generic.List<InspectMethod>
A list of InspectMethod objects associated with the provided type or its base types; returns null if the internal dictionary fails to initialize.

InspectMethod Class

Provides functionality to inspect and invoke a method associated with an InspectAttribute.

public class InspectMethod

Inheritance System.Object → InspectMethod

Constructors

InspectMethod(MethodInfo, InspectAttribute) Constructor

Initializes a new instance of the InspectMethod class.

public InspectMethod(System.Reflection.MethodInfo? methodInfo, DiGi.Rhino.Core.Classes.InspectAttribute? inspectAttribute);

Parameters

methodInfo System.Reflection.MethodInfo

The reflection information of the method.

inspectAttribute InspectAttribute

The attribute associated with the method.

Properties

InspectMethod.InspectAttribute Property

Gets the attribute associated with the inspected method.

public DiGi.Rhino.Core.Classes.InspectAttribute? InspectAttribute { get; }

Property Value

InspectAttribute

InspectMethod.MethodInfo Property

Gets the reflection information of the inspected method.

public System.Reflection.MethodInfo? MethodInfo { get; }

Property Value

System.Reflection.MethodInfo

Methods

InspectMethod.IsEnumerable() Method

Checks if the inspected method is valid and specifically returns an enumerable collection.

public bool IsEnumerable();

Returns

System.Boolean
True if the method is valid and return type is enumerable; otherwise, false.

InspectMethod.IsValid() Method

Determines whether the inspected method is valid.

public bool IsValid();

Returns

System.Boolean
True if the method is valid; otherwise, false.

InspectMethod.IsValid(bool) Method

Determines whether the inspected method is valid based on its return type.

public bool IsValid(out bool enumerable);

Parameters

enumerable System.Boolean

When this method returns, contains a boolean value indicating whether the return type is an enumerable collection.

Returns

System.Boolean
True if the method is valid; otherwise, false.

InspectMethod.TryGetValue<T>(object, T) Method

Attempts to invoke the inspected method and convert its result to a specified type.

public bool TryGetValue<T>(object? @object, out T? value);

Type parameters

T

The target type for the return value.

Parameters

object System.Object

The object instance to use for invocation (if applicable).

value T

When this method returns, contains the converted value if successful; otherwise, the default value of <typeparam ref="T" />.

Returns

System.Boolean
True if the value was successfully retrieved and converted; otherwise, false.

NullAttributes Class

Provides a null implementation of the Grasshopper.Kernel.IGH_Attributes interface, serving as a placeholder or default attribute set that performs no operations.

public class NullAttributes

Inheritance System.ObjectGrasshopper.Kernel.IGH_AttributesGH_IO.GH_ISerializableGrasshopper.GUI.Canvas.IGH_ResponsiveObjectGrasshopper.GUI.Canvas.IGH_TooltipAwareObject → NullAttributes

Constructors

NullAttributes() Constructor

Initializes a new instance of the NullAttributes class.

public NullAttributes();

Properties

NullAttributes.AllowMessageBalloon Property

Gets a value indicating whether message balloons are allowed for these attributes.

public bool AllowMessageBalloon { get; }

Property Value

System.Boolean

NullAttributes.Bounds Property

Gets or sets the bounding rectangle of the attributes.

public System.Drawing.RectangleF Bounds { get; set; }

Property Value

System.Drawing.RectangleF

Exceptions

System.NotImplementedException
Thrown when setting the value.

NullAttributes.DocObject Property

Gets the document object associated with these attributes.

public IGH_DocumentObject? DocObject { get; }

Property Value

Grasshopper.Kernel.IGH_DocumentObject

NullAttributes.GetTopLevel Property

Gets the top-level attribute set in the hierarchy.

public IGH_Attributes? GetTopLevel { get; }

Property Value

Grasshopper.Kernel.IGH_Attributes

NullAttributes.HasInputGrip Property

Gets a value indicating whether the attributes have an input grip.

public bool HasInputGrip { get; }

Property Value

System.Boolean

NullAttributes.HasOutputGrip Property

Gets a value indicating whether the attributes have an output grip.

public bool HasOutputGrip { get; }

Property Value

System.Boolean

NullAttributes.InputGrip Property

Gets the position of the input grip on the canvas.

public System.Drawing.PointF InputGrip { get; }

Property Value

System.Drawing.PointF

NullAttributes.InstanceGuid Property

Gets the unique identifier for this instance of the attributes.

public System.Guid InstanceGuid { get; }

Property Value

System.Guid

NullAttributes.IsTopLevel Property

Gets a value indicating whether these attributes are at the top level of the hierarchy.

public bool IsTopLevel { get; }

Property Value

System.Boolean

NullAttributes.OutputGrip Property

Gets the position of the output grip on the canvas.

public System.Drawing.PointF OutputGrip { get; }

Property Value

System.Drawing.PointF

NullAttributes.Parent Property

Gets or sets the parent attribute set.

public IGH_Attributes? Parent { get; set; }

Property Value

Grasshopper.Kernel.IGH_Attributes

Exceptions

System.NotImplementedException
Thrown when setting the value.

NullAttributes.PathName Property

Gets the path name associated with these attributes.

public string PathName { get; }

Property Value

System.String

NullAttributes.Pivot Property

Gets or sets the pivot point of the attributes.

public System.Drawing.PointF Pivot { get; set; }

Property Value

System.Drawing.PointF

Exceptions

System.NotImplementedException
Thrown when setting the value.

NullAttributes.Selected Property

Gets or sets a value indicating whether these attributes are currently selected.

public bool Selected { get; set; }

Property Value

System.Boolean

Exceptions

System.NotImplementedException
Thrown when setting the value.

NullAttributes.TooltipEnabled Property

Gets a value indicating whether tooltips are enabled for these attributes.

public bool TooltipEnabled { get; }

Property Value

System.Boolean

Methods

NullAttributes.AppendToAttributeTree(List<IGH_Attributes>) Method

Appends the current attribute instance to the provided attribute tree list.

public void AppendToAttributeTree(System.Collections.Generic.List<IGH_Attributes> attributes);

Parameters

attributes System.Collections.Generic.List<Grasshopper.Kernel.IGH_Attributes>

The list of attributes to append to.

NullAttributes.ExpireLayout() Method

Notifies the system that the layout of the attributes has expired and needs to be recalculated.

public void ExpireLayout();

NullAttributes.InvalidateCanvas(GH_Canvas, GH_CanvasMouseEvent) Method

Determines whether the canvas should be invalidated based on a mouse event.

public bool InvalidateCanvas(GH_Canvas canvas, GH_CanvasMouseEvent e);

Parameters

canvas Grasshopper.GUI.Canvas.GH_Canvas

The canvas where the event occurred.

e Grasshopper.GUI.GH_CanvasMouseEvent

The mouse event arguments.

Returns

System.Boolean
true if the canvas should be invalidated; otherwise, false.

NullAttributes.IsMenuRegion(PointF) Method

Determines whether a specific point on the canvas is within the menu region of these attributes.

public bool IsMenuRegion(System.Drawing.PointF point);

Parameters

point System.Drawing.PointF

The point to test.

Returns

System.Boolean
true if the point is in the menu region; otherwise, false.

NullAttributes.IsPickRegion(PointF) Method

Determines whether a specific point on the canvas is within the pickable region of these attributes.

public bool IsPickRegion(System.Drawing.PointF point);

Parameters

point System.Drawing.PointF

The point to test.

Returns

System.Boolean
true if the point is in the pick region; otherwise, false.

NullAttributes.IsPickRegion(RectangleF, GH_PickBox) Method

Determines whether a specific rectangular area on the canvas intersects with the pickable region of these attributes.

public bool IsPickRegion(System.Drawing.RectangleF box, GH_PickBox method);

Parameters

box System.Drawing.RectangleF

The bounding box to test.

method Grasshopper.Kernel.GH_PickBox

The picking method used.

Returns

System.Boolean
true if the area is in the pick region; otherwise, false.

NullAttributes.IsTooltipRegion(PointF) Method

Determines whether a specific point on the canvas is within the tooltip region of these attributes.

public bool IsTooltipRegion(System.Drawing.PointF canvasPoint);

Parameters

canvasPoint System.Drawing.PointF

The point to test.

Returns

System.Boolean
true if the point is in the tooltip region; otherwise, false.

NullAttributes.NewInstanceGuid() Method

Generates a new unique identifier for this instance.

public void NewInstanceGuid();

Exceptions

System.NotImplementedException
Thrown because this method is not implemented.

NullAttributes.NewInstanceGuid(Guid) Method

Assigns a specific unique identifier to this instance.

public void NewInstanceGuid(System.Guid newID);

Parameters

newID System.Guid

The new GUID to assign.

Exceptions

System.NotImplementedException
Thrown because this method is not implemented.

NullAttributes.PerformLayout() Method

Performs the layout calculations for the attributes.

public void PerformLayout();

Exceptions

System.NotImplementedException
Thrown because this method is not implemented.

NullAttributes.Read(GH_IReader) Method

Reads the attributes from a serialization reader.

public bool Read(GH_IReader reader);

Parameters

reader GH_IO.Serialization.GH_IReader

The reader to read data from.

Returns

System.Boolean
true if reading was successful; otherwise, false.

NullAttributes.RenderToCanvas(GH_Canvas, GH_CanvasChannel) Method

Renders the attributes onto the Grasshopper canvas using the specified channel.

public void RenderToCanvas(GH_Canvas canvas, GH_CanvasChannel channel);

Parameters

canvas Grasshopper.GUI.Canvas.GH_Canvas

The canvas to render on.

channel Grasshopper.GUI.Canvas.GH_CanvasChannel

The rendering channel to use.

NullAttributes.RespondToKeyDown(GH_Canvas, KeyEventArgs) Method

Handles the key down event on the canvas.

public GH_ObjectResponse RespondToKeyDown(GH_Canvas sender, System.Windows.Forms.KeyEventArgs e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e System.Windows.Forms.KeyEventArgs

The key event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.RespondToKeyUp(GH_Canvas, KeyEventArgs) Method

Handles the key up event on the canvas.

public GH_ObjectResponse RespondToKeyUp(GH_Canvas sender, System.Windows.Forms.KeyEventArgs e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e System.Windows.Forms.KeyEventArgs

The key event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.RespondToMouseDoubleClick(GH_Canvas, GH_CanvasMouseEvent) Method

Handles the mouse double-click event on the canvas.

public GH_ObjectResponse RespondToMouseDoubleClick(GH_Canvas sender, GH_CanvasMouseEvent e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e Grasshopper.GUI.GH_CanvasMouseEvent

The mouse event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.RespondToMouseDown(GH_Canvas, GH_CanvasMouseEvent) Method

Handles the mouse down event on the canvas.

public GH_ObjectResponse RespondToMouseDown(GH_Canvas sender, GH_CanvasMouseEvent e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e Grasshopper.GUI.GH_CanvasMouseEvent

The mouse event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.RespondToMouseMove(GH_Canvas, GH_CanvasMouseEvent) Method

Handles the mouse move event on the canvas.

public GH_ObjectResponse RespondToMouseMove(GH_Canvas sender, GH_CanvasMouseEvent e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e Grasshopper.GUI.GH_CanvasMouseEvent

The mouse event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.RespondToMouseUp(GH_Canvas, GH_CanvasMouseEvent) Method

Handles the mouse up event on the canvas.

public GH_ObjectResponse RespondToMouseUp(GH_Canvas sender, GH_CanvasMouseEvent e);

Parameters

sender Grasshopper.GUI.Canvas.GH_Canvas

The canvas that sent the event.

e Grasshopper.GUI.GH_CanvasMouseEvent

The mouse event arguments.

Returns

Grasshopper.GUI.Canvas.GH_ObjectResponse
A Grasshopper.GUI.Canvas.GH_ObjectResponse indicating how the event was handled.

NullAttributes.SetupTooltip(PointF, GH_TooltipDisplayEventArgs) Method

Configures the tooltip display for these attributes at a specific canvas point.

public void SetupTooltip(System.Drawing.PointF canvasPoint, GH_TooltipDisplayEventArgs e);

Parameters

canvasPoint System.Drawing.PointF

The point on the canvas where the tooltip is triggered.

e Grasshopper.GUI.GH_TooltipDisplayEventArgs

The tooltip display event arguments.

NullAttributes.Write(GH_IWriter) Method

Writes the attributes to a serialization writer.

public bool Write(GH_IWriter writer);

Parameters

writer GH_IO.Serialization.GH_IWriter

The writer to write data to.

Returns

System.Boolean
true if writing was successful; otherwise, false.

NumberComparisonType Class

Represents a component that allows the selection of a number comparison type.

public class NumberComparisonType : DiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.NumberComparisonType>

Inheritance Grasshopper.Kernel.GH_ComponentDiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.NumberComparisonType> → NumberComparisonType

Constructors

NumberComparisonType() Constructor

Initializes a new instance of the NumberComparisonType class.

public NumberComparisonType();

Properties

NumberComparisonType.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Read Class

A Grasshopper component that reads serializable objects from a specified file path.

public class Read : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Read

Constructors

Read() Constructor

Initializes a new instance of the Read class.

public Read();

Properties

Read.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Read.Exposure Property

Gets the exposure level of the component, determining how it is displayed in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Read.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Read.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Read.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

RemoveValue Class

A component that removes a specific parameter definition from a parametrized object.

public class RemoveValue : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → RemoveValue

Constructors

RemoveValue() Constructor

Initializes a new instance of the RemoveValue class.

public RemoveValue();

Properties

RemoveValue.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

RemoveValue.Exposure Property

Gets the exposure level of the component.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

RemoveValue.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

RemoveValue.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

RemoveValue.SolveInstance(IGH_DataAccess) Method

Executes the logic to remove a specific parameter definition from the provided parametrized object.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object used to retrieve data from inputs and store results in outputs.

RhinoInfo Class

Provides assembly information for the DiGi.Rhino.Core Grasshopper plugin.

public class RhinoInfo

Inheritance Grasshopper.Kernel.GH_AssemblyInfo → RhinoInfo

Properties

RhinoInfo.AuthorContact Property

Gets the preferred contact details for the author.

public override string AuthorContact { get; }

Property Value

System.String

RhinoInfo.AuthorName Property

Gets the name of the author or company.

public override string AuthorName { get; }

Property Value

System.String

RhinoInfo.Description Property

Gets a short string describing the purpose of this GHA library.

public override string Description { get; }

Property Value

System.String

RhinoInfo.Icon Property

Gets a 24x24 pixel bitmap to represent this GHA library.

public override System.Drawing.Bitmap? Icon { get; }

Property Value

System.Drawing.Bitmap

RhinoInfo.Id Property

Gets the unique identifier for this assembly.

public override System.Guid Id { get; }

Property Value

System.Guid

RhinoInfo.Name Property

Gets the name of the GHA library.

public override string Name { get; }

Property Value

System.String

Serialize Class

A Grasshopper component that serializes a collection of DiGi.Core.Interfaces.ISerializableObject objects into a JSON string format.

public class Serialize : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Serialize

Constructors

Serialize() Constructor

Initializes a new instance of object.

public Serialize();

Properties

Serialize.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Serialize.Exposure Property

Gets the exposure level of the component, which determines how it is displayed in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Serialize.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Serialize.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Serialize.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

SetValue Class

A Grasshopper component that sets a value for a given parameter definition on a parametrized object.

public class SetValue : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → SetValue

Constructors

SetValue() Constructor

Initializes a new instance of object.

public SetValue();

Properties

SetValue.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

SetValue.Exposure Property

Gets the exposure level of the component.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

SetValue.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

SetValue.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

SetValue.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

TextComparisonType Class

Represents the text comparison type component, providing functionality to specify how two strings are compared.

public class TextComparisonType : DiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.TextComparisonType>

Inheritance Grasshopper.Kernel.GH_ComponentDiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.TextComparisonType> → TextComparisonType

Constructors

TextComparisonType() Constructor

Initializes a new instance of the TextComparisonType class.

public TextComparisonType();

Properties

TextComparisonType.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

TimeSeries Class

Represents a Grasshopper component that generates a time series based on a specified start time, end time, and step interval.

public class TimeSeries : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → TimeSeries

Constructors

TimeSeries() Constructor

Initializes a new instance of the TimeSeries class.

public TimeSeries();

Properties

TimeSeries.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

TimeSeries.Exposure Property

Gets the exposure level of the component, determining its visibility and priority in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

TimeSeries.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

TimeSeries.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

TimeSeries.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

TypeByFullName Class

A Grasshopper component that retrieves a .NET System.Type based on its full assembly-qualified name.

public class TypeByFullName : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → TypeByFullName

Constructors

TypeByFullName() Constructor

Initializes a new instance of the TypeByFullName class.

public TypeByFullName();

Properties

TypeByFullName.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

TypeByFullName.Exposure Property

Gets the exposure level of the component, which determines its visual representation in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

TypeByFullName.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

TypeByFullName.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

TypeByFullName.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

TypeByObject Class

A Grasshopper component that retrieves the type of a given input object.

public class TypeByObject : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → TypeByObject

Constructors

TypeByObject() Constructor

Initializes a new instance of the TypeByObject class.

public TypeByObject();

Properties

TypeByObject.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

TypeByObject.Exposure Property

Gets the exposure level of the component, which defines how it is displayed in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

TypeByObject.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

TypeByObject.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

TypeByObject.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

UTC Class

Represents a component for handling Coordinated Universal Time (UTC) time zones.

public class UTC : DiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.UTC>

Inheritance Grasshopper.Kernel.GH_ComponentDiGi.Rhino.Core.Classes.EnumComponent<DiGi.Core.Enums.UTC> → UTC

Constructors

UTC() Constructor

Initializes a new instance of the UTC class.

public UTC();

Properties

UTC.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

VariableParameterComponent Class

Provides a base implementation for Grasshopper components that support dynamic addition and removal of parameters based on predefined templates.

public abstract class VariableParameterComponent : DiGi.Rhino.Core.Classes.Component

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponent → VariableParameterComponent

Derived
Address
Coordinates
Deserialize
FilterByMask
FilterByNumber
FilterByText
GetValue
Read
RemoveValue
Serialize
SetValue
TimeSeries
TypeByFullName
TypeByObject
Write

Constructors

VariableParameterComponent(string, string, string, string, string) Constructor

Initializes a new instance of the VariableParameterComponent class.

public VariableParameterComponent(string name, string nickname, string description, string category, string subCategory);

Parameters

name System.String

The name of the component.

nickname System.String

The nickname of the component.

description System.String

The description of the component.

category System.String

The category the component belongs to.

subCategory System.String

The sub-category the component belongs to.

Properties

VariableParameterComponent.Inputs Property

Gets the template definitions for the input parameters.

protected abstract DiGi.Rhino.Core.Classes.Param[]? Inputs { protected get; }

Property Value

Param[]

VariableParameterComponent.Outputs Property

Gets the template definitions for the output parameters.

protected abstract DiGi.Rhino.Core.Classes.Param[]? Outputs { protected get; }

Property Value

Param[]

Methods

VariableParameterComponent.CanInsertParameter(GH_ParameterSide, int) Method

Determines whether a parameter can be inserted at the specified index on the given side of the component.

public bool CanInsertParameter(GH_ParameterSide parameterSide, int index);

Parameters

parameterSide Grasshopper.Kernel.GH_ParameterSide

The side (Input or Output) where the parameter is to be inserted.

index System.Int32

The index position for insertion.

Returns

System.Boolean
true if the parameter can be inserted; otherwise, false.

VariableParameterComponent.CanRemoveParameter(GH_ParameterSide, int) Method

Determines whether a parameter can be removed from the specified index on the given side of the component.

public bool CanRemoveParameter(GH_ParameterSide parameterSide, int index);

Parameters

parameterSide Grasshopper.Kernel.GH_ParameterSide

The side (Input or Output) where the parameter is to be removed.

index System.Int32

The index position of the parameter to remove.

Returns

System.Boolean
true if the parameter can be removed; otherwise, false.

VariableParameterComponent.CreateParameter(GH_ParameterSide, int) Method

Creates a new parameter based on the template definition for the specified side and index.

public IGH_Param? CreateParameter(GH_ParameterSide parameterSide, int index);

Parameters

parameterSide Grasshopper.Kernel.GH_ParameterSide

The side (Input or Output) where the parameter is to be created.

index System.Int32

The index position for creation.

Returns

Grasshopper.Kernel.IGH_Param
A cloned instance of the template parameter, or null if no suitable template exists.

VariableParameterComponent.DestroyParameter(GH_ParameterSide, int) Method

Destroys a parameter at the specified index on the given side of the component.

public virtual bool DestroyParameter(GH_ParameterSide parameterSide, int index);

Parameters

parameterSide Grasshopper.Kernel.GH_ParameterSide

The side (Input or Output) where the parameter is to be destroyed.

index System.Int32

The index position of the parameter to destroy.

Returns

System.Boolean
true if the parameter was successfully destroyed; otherwise, false.

VariableParameterComponent.RegisterInputParams(GH_InputParamManager) Method

Registers the default input parameters based on the provided templates.

protected sealed override void RegisterInputParams(GH_InputParamManager inputParamManager);

Parameters

inputParamManager Grasshopper.Kernel.GH_Component.GH_InputParamManager

The manager used to register input parameters.

VariableParameterComponent.RegisterOutputParams(GH_OutputParamManager) Method

Registers the default output parameters based on the provided templates.

protected sealed override void RegisterOutputParams(GH_OutputParamManager outputParamManager);

Parameters

outputParamManager Grasshopper.Kernel.GH_Component.GH_OutputParamManager

The manager used to register output parameters.

VariableParameterComponent.VariableParameterMaintenance() Method

Performs maintenance tasks on the variable parameters of the component.

public void VariableParameterMaintenance();

Write Class

A Grasshopper component that serializes a collection of DiGi.Core.Interfaces.ISerializableObject instances and writes them to a file in JSON format.

public class Write : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentComponentGrasshopper.Kernel.IGH_VariableParameterComponentVariableParameterComponent → Write

Constructors

Write() Constructor

Initializes a new instance of the Write class.

public Write();

Properties

Write.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

Write.Exposure Property

Gets the exposure level of the component, which determines how it is displayed and interacted with in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

Write.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

Param[]

Write.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

Param[]

Methods

Write.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

Structs

Param Struct

Represents a wrapper for a Grasshopper parameter, including its visibility settings.

public readonly struct Param

Constructors

Param(IGH_Param) Constructor

Initializes a new instance of the Param struct with default visibility set to Binding.

public Param(IGH_Param gH_Param);

Parameters

gH_Param Grasshopper.Kernel.IGH_Param

The Grasshopper parameter to wrap.

Param(IGH_Param, ParameterVisibility) Constructor

Initializes a new instance of the Param struct with specified visibility.

public Param(IGH_Param gH_Param, DiGi.Rhino.Core.Enums.ParameterVisibility parameterVisibility);

Parameters

gH_Param Grasshopper.Kernel.IGH_Param

The Grasshopper parameter to wrap.

parameterVisibility ParameterVisibility

The visibility setting for the parameter.

Fields

Param.GH_Param Field

Gets the underlying Grasshopper parameter instance.

public readonly IGH_Param GH_Param;

Field Value

Grasshopper.Kernel.IGH_Param

Param.ParameterVisibility Field

Gets the visibility setting for this parameter.

public readonly ParameterVisibility ParameterVisibility;

Field Value

ParameterVisibility

Clone this wiki locally