# OpcAddVariableNode Class

> Reference: Defines an abstract base class for a single command of the IOpcAddNodesService used to add one variable node (nodes of the category Variable).

<span class="api-meta">abstract · since v2.7</span>

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcAddVariableNode Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Defines an abstract base class for a single command of the [IOpcAddNodesService](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcaddnodesservice/) used to add one variable node (nodes of the category [Variable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/#variable)).

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public abstract class OpcAddVariableNode : OpcAddInstanceNode
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public MustInherit Class OpcAddVariableNode
    Inherits OpcAddInstanceNode
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcservicecommand/) → [OpcNodeServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeservicecommand/) → [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) → [OpcAddInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddinstancenode/) → **OpcAddVariableNode**

## Derived types

- [OpcAddDataItemNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcadddataitemnode/)
- [OpcAddDataVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcadddatavariablenode/)
- [OpcAddPropertyNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddpropertynode/)
- [OpcAddPropertyNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddpropertynode-1/)

## Constructors

| Name | Description |
|---|---|
| [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode)<span class="api-meta">protected · 20 overloads</span> | Initializes a new instance of the OpcAddVariableNode class using the specified `type` of variable node to add, which shall be accessible by the `name` defined. |

## Properties

| Name | Description |
|---|---|
| [AccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#accesslevel) | Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data. |
| [ArrayDimensions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#arraydimensions)<span class="api-meta">since v2.9</span> | Gets the number/lengths of dimensions for an array [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) with one or more fixed dimensions. |
| [DataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#datatype)<span class="api-meta">virtual</span> | Gets or sets a value which defines a pre-defined used [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#datatypeid) as one of the members defined by the [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/) enumeration to simplify querying standard data types. |
| [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#datatypeid) | Gets or stets the identifier which identifies the node that defines the type of data represented by the variable node. |
| [IsHistorizing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#ishistorizing) | Gets or sets a value indicating whether the server is actively collecting data for the history of the variable. |
| [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#type) | Gets value indicating the predefined underlying type definition the new node will represent an instance of. |
| [UserAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#useraccesslevel) | Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data taking user access rights into account. |
| [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) | Gets or sets the value of the variable node which may be simple or complex. |
| [ValueRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#valuerank) | Gets or sets a value which indicates whether the value attribute of the variable is an array and how many dimensions the array has. |

## Methods

| Name | Description |
|---|---|
| [OfType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#oftype)<span class="api-meta">static</span> | Retrieves an instance which represents the definition of a variable type that can be used to define OpcAddVariableNode command instances using the type of variable node represented by the [OpcAddVariableNode.TypeDefinition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode.typedefinition/) instance provided. |

Inherits members from [OpcAddInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddinstancenode/members), [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/members), [OpcNodeServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeservicecommand/members), [OpcServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcservicecommand/members).

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.7–v2.59 |
