Skip to content

GH_Variant

Public Class

Variant data used in Grasshopper Expressions.

Inheritance Hierarchy

System.Object
Grasshopper.Kernel.Expressions.GH_Variant

Namespace: Grasshopper.Kernel.Expressions

Assembly: Grasshopper (in Grasshopper.dll)

Syntax

public class GH_Variant

The GH_Variant type exposes the following members.

Constructors

Name

Description


Public Method

Create a new Null variant.


Public Method

Create a new Bool variant.


Public Method

Create a new Complex variant.


Public Method

Create a new Double variant.


Public Method

Duplicate a Variant.


Public Method

Create a new Integer variant.


Public Method

Create a new Plane variant.


Public Method

Create a new Point variant.


Public Method

Create a new String variant.


Public Method

Create a new Point variant.


Properties

Name

Description


Public Property

Gets the contents of this Variant as a bool.


Public Property

Gets the contents of this Variant as a complex number.


Public Property

Gets the contents of this Variant as a double. If the Variant is of type Integer this cast will also work.


Public Property

Gets the contents of this Variant as an integer.


Public Property

Gets the contents of this Variant as a Plane.


Public Property

Gets the contents of this Variant as a Point.


Public Property

Gets the contents of this Variant as a String. This function will work for all Variant types.


Public Property

Gets the contents of this Variant as a Vector.


Public Property

Gets a value indicating whether or not the Variant is a numeric type. Only Doubles and Integers are considered to be Numeric.


Public Property

Gets the Type of this Variant.


Methods

Name

Description


Public Method

Perform a straight cast of the data inside this Variant.


Public Method

Duplicate this Variant. If the type of this Variant is [unknown] the contents are not guaranteed to be duplicated.


Public Method

If this variant represents a string, this function will attempt to evaluate that string and replace the data inside this variant.


Public Method

Attempt to convert a Variant to a Grasshopper IGH_Goo type.


Public Method

(Overrides Object.ToString..)