# Argument class

Namespace: [Grasshopper2.UI.Graphing](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.graphing.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class Argument : IStorable
```

An argument (or parameter) for a [FunctionUi](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functionui.md). This is either a 2D grip, or a 1D scalar/referent.

**Derived types:** [ScalarArgument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument.md), [VectorArgument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.vectorargument.md)

## Constructors

- [Argument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/ctor.md)

## Fields

- [UnsetIndex](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/unsetindex.md): (static)

## Properties

- [Id](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/id.md): The id of this parameter. This is how the function editor UI can tell apart various parameters for various functions.
- [Index](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/index.md): The index of this parameter. This is used by the FunctionUI to access specific parameters. It can therefore not be modified during the lifetime of the parameter.
- [IsScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/isscalar.md): Gets whether this parameter is a 1D scalar.
- [IsVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/isvector.md): Gets whether this parameter is a 2D vector.
- [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/nomen.md): Description of this argument. Used to populate tooltips.
- [Parent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/parent.md): Grip or Scalar which serves as a parent for this argument.

## Methods

- [AsScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/asscalar.md): Cast this parameter to a scalar.
- [AsVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/asvector.md): Cast this parameter to a vector.
- [OnArgumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/onargumentchanged.md)
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/store.md)
- [ToFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/tofunction.md): Convert the value inside this argument to a function. This method will fail if the argument is a Vector.
- [ToScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/toscalar.md): Convert the value inside this argument to a scalar. This method will fail if the argument is a Referent, or if the argument is a Vector.
- [ToVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/tovector.md): Convert the value inside this argument to a vector. This method will fail if the argument is not of type vector.

## Events

- [ArgumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/argumentchanged.md): Raised whenever one of the arguments in this collection is given a different value. Oftentimes arguments are modified in quick succession, so it's best to not take immediate action based on this event, but merely to expire caches or set dirty flags.
