# ScalarArgument 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
[IoId("00000000-4667-44E6-B66B-55D79EF1788D")]
public sealed class ScalarArgument : Argument
```

A one-dimensional scalar function argument. Scalars manifest themselves as sliders in the function editor.

## Constructors

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

## Properties

- [CanBeReferenced](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/canbereferenced.md): Gets or sets whether this scalar has support for referenced functions.
- [IsReferenced](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/isreferenced.md): Gets whether this scalar is a reference to a function, rather than some constant value.
- [Number](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/number.md): Gets the limits for this scalar.
- [Referent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/referent.md): Gets the assigned referent, if any.
- [ReferentId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/referentid.md): Gets the ID of the function UI which provides the current referent. If this ID is Guid.Empty, no function is referenced, although a function may still be assigned.
- [ReferentName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/referentname.md): Gets the name of the referent function, if any.

## Methods

- [RevertToSavedState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/reverttosavedstate.md): Revert the [ScalarArgument.Number](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/number.md) to the most recently saved state.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/store.md)
- [TryAssignDomain](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/tryassigndomain.md): Assign a new slider domain to this scalar, dropping any referent and clamping the current value into the new range. This is how a referenced parameter is turned back into a plain slider with a chosen domain.
- [TryAssignValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/tryassignvalue.md): (3 overloads) Set and update the current state.
- [UpdateSavedState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/updatesavedstate.md): Create a new most recent saved state based on the current [ScalarArgument.Number](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.scalarargument/number.md).

## Inherited Members

- From [Argument](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument.md): [Id](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/id.md), [Index](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/index.md), [IsScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/isscalar.md), [IsVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/isvector.md), [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/nomen.md), [Parent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/parent.md), [ArgumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/argumentchanged.md), [AsScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/asscalar.md), [AsVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/asvector.md), [OnArgumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/onargumentchanged.md), [ToFunction](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/tofunction.md), [ToScalar](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/toscalar.md), [ToVector](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.argument/tovector.md)
