# OpcWriteNode Members

> Reference: Defines a single command of the IOpcWriteNodesService.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcWriteNode</a></dd>
<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>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [OpcNodeAttributeServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeattributeservicecommand/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).

## Constructors

### OpcWriteNode

<span class="api-meta">20 overloads</span>

| Overload | Description |
|---|---|
| [OpcWriteNode(OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-opc-uafx-opcnodeid-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(string, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(string, int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-system-int32-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(int, int, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-system-int32-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(OpcNodeId, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-opc-uafx-opcnodeid-opc-uafx-opcattribute-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`. |
| [OpcWriteNode(string, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-opc-uafx-opcattribute-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`. |
| [OpcWriteNode(int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-opc-uafx-opcattribute-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`. |
| [OpcWriteNode(string, int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-system-int32-opc-uafx-opcattribute-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the `attribute`. |
| [OpcWriteNode(int, int, OpcAttribute, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-system-int32-opc-uafx-opcattribute-system-object) | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the `attribute`. |
| [OpcWriteNode(OpcNodeId, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-opc-uafx-opcnodeid-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(string, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(string, int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(int, int, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-system-int32-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| [OpcWriteNode(OpcNodeId, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-opc-uafx-opcnodeid-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`. |
| [OpcWriteNode(string, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`. |
| [OpcWriteNode(int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`. |
| [OpcWriteNode(string, int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-string-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the `attribute`. |
| [OpcWriteNode(int, int, OpcAttribute, OpcRange, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#opcwritenode-system-int32-system-int32-opc-uafx-opcattribute-opc-uafx-opcrange-system-object)<span class="api-meta">since v2.24</span> | Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the `attribute`. |

#### OpcWriteNode(OpcNodeId, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(OpcNodeId nodeId, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service will write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The command does not support empty node identifiers. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcWriteNode(string, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(string nodeId, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As String, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(int, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(int nodeId, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As Integer, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(string, int, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(string nodeId, int namespaceIndex, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As String, namespaceIndex As Integer, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(int, int, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(int nodeId, int namespaceIndex, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As Integer, namespaceIndex As Integer, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(OpcNodeId, OpcAttribute, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`.

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

```csharp
public OpcWriteNode(OpcNodeId nodeId, OpcAttribute attribute, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId, attribute As OpcAttribute, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service will write the `value` to the `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The command does not support empty node identifiers. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcWriteNode(string, OpcAttribute, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`.

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

```csharp
public OpcWriteNode(string nodeId, OpcAttribute attribute, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As String, attribute As OpcAttribute, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(int, OpcAttribute, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` to the `attribute`.

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

```csharp
public OpcWriteNode(int nodeId, OpcAttribute attribute, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As Integer, attribute As OpcAttribute, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(string, int, OpcAttribute, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the `attribute`.

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

```csharp
public OpcWriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(int, int, OpcAttribute, object)

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` to the `attribute`.

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

```csharp
public OpcWriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(OpcNodeId, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(OpcNodeId nodeId, OpcRange range, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As OpcNodeId, range As OpcRange, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service will write the `value` to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The command does not support empty node identifiers. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcWriteNode(string, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(string nodeId, OpcRange range, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As String, range As OpcRange, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(int nodeId, OpcRange range, object value)
```

</div>

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

```vbnet
Public Sub New(nodeId As Integer, range As OpcRange, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(string, int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(
    string nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As String,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(int, int, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute.

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

```csharp
public OpcWriteNode(
    int nodeId,
    int namespaceIndex,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As Integer,
    namespaceIndex As Integer,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute. |

#### OpcWriteNode(OpcNodeId, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`.

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

```csharp
public OpcWriteNode(
    OpcNodeId nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As OpcNodeId,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node on which the service will write the `value` to the `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The command does not support empty node identifiers. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcWriteNode(string, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`.

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

```csharp
public OpcWriteNode(
    string nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As String,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(int, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` to write the `value` into the `range` of the `attribute`.

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

```csharp
public OpcWriteNode(
    int nodeId,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(string, int, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the `attribute`.

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

```csharp
public OpcWriteNode(
    string nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As String,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The textual node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

#### OpcWriteNode(int, int, OpcAttribute, OpcRange, object)

<span class="api-meta">since v2.24</span>

Initializes a new instance of the [OpcWriteNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/) class using the specified `nodeId` and `namespaceIndex` to write the `value` into the `range` of the `attribute`.

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

```csharp
public OpcWriteNode(
    int nodeId,
    int namespaceIndex,
    OpcAttribute attribute,
    OpcRange range,
    object value)
```

</div>

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

```vbnet
Public Sub New(
    nodeId As Integer,
    namespaceIndex As Integer,
    attribute As OpcAttribute,
    range As OpcRange,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric node identifier of the node on which the service, who will execute this command, will operate on its `attribute`. |
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the namespace within that the node with the `nodeId` specified can be located. |
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration that defines which node attribute is to be used by the service. |
| `range` | [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) | The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) to use to identify the single element or range of elements to write. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The data to write to the `attribute`. |

## Properties

### Range

<span class="api-meta">since v2.24</span>

Gets the [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) used to identify a single element or range of elements in the [Attribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeattributeservicecommand/members#attribute).

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

```csharp
public OpcRange Range { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Range As OpcRange
```

</div>

**Property value**

[OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/)

The [OpcRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/) used to identify a single element of an array or a single range of indexes for arrays. The first element is identified by index zero. The [Range](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#range) is not used if the specified [Attribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeattributeservicecommand/members#attribute) is not an array. However, if the specified [Attribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeattributeservicecommand/members#attribute) is an array and this property is not used, then all elements are to be included in the range. If [Empty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrange/members#empty) is used for this property the range is not used.

**Remarks**

A server shall return a [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) if a [Range](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#range) is provided and writing into the [Range](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritenode/members#range) is not possible for a node.

### Value

Gets the data which is to be written by the service to a specific attribute of a specific node.

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

```csharp
public OpcValue Value { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Value As OpcValue
```

</div>

**Property value**

[OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/)

The [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) representing the container for the non-[OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) data used to initialize this command; otherwise the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to write.
