# OpcClient.UpdateNodesHistory Method

> Reference: Updates the history of the nodes as defined by the commands specified using a single history update service request.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</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">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

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

| Overload | Description |
|---|---|
| [UpdateNodesHistory(IEnumerable&lt;OpcNodeHistoryCommand&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/updatenodeshistory#updatenodeshistory-system-collections-generic-ienumerable-of-opc-uafx-client-opcnodehistorycommand) | Updates the history of the nodes as defined by the `commands` specified using a single history update service request. |
| [UpdateNodesHistory(params OpcNodeHistoryCommand\[\])](#updatenodeshistory-opc-uafx-client-opcnodehistorycommand-array) | Updates the history of the nodes as defined by the `commands` specified using a single history update service request. |
| [UpdateNodesHistory(IEnumerable&lt;OpcUpdateNodeHistory&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/updatenodeshistory#updatenodeshistory-system-collections-generic-ienumerable-of-opc-uafx-client-opcupdatenodehistory) | Updates the history of the nodes as defined by the `commands` specified using a single history update service request. |
| [UpdateNodesHistory(params OpcUpdateNodeHistory\[\])](#updatenodeshistory-opc-uafx-client-opcupdatenodehistory-array) | Updates the history of the nodes as defined by the `commands` specified using a single history update service request. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The client is not connected to the server or the service execution failed upon different circumstances; for more details see exception details. |
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |

## UpdateNodesHistory(IEnumerable&lt;OpcNodeHistoryCommand&gt;)

Updates the history of the nodes as defined by the `commands` specified using a single history update service request.

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

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> UpdateNodesHistory(
    IEnumerable<OpcNodeHistoryCommand> commands)
```

</div>

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

```vbnet
Public Function UpdateNodesHistory(
    commands As IEnumerable(Of OpcNodeHistoryCommand)) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeHistoryCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodehistorycommand/)&gt; | A sequence of [OpcNodeHistoryCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodehistorycommand/) commands, each defining the node and the update to perform on its history. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items is a null reference (Nothing in Visual Basic). |
| [LicenseException](https://learn.microsoft.com/dotnet/api/system.componentmodel.licenseexception) | The license is expired. |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.

## UpdateNodesHistory(params OpcNodeHistoryCommand\[\])

Updates the history of the nodes as defined by the `commands` specified using a single history update service request.

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

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> UpdateNodesHistory(
    params OpcNodeHistoryCommand[] commands)
```

</div>

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

```vbnet
Public Function UpdateNodesHistory(
    ParamArray commands As OpcNodeHistoryCommand()) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcNodeHistoryCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodehistorycommand/)[] | An array of [OpcNodeHistoryCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodehistorycommand/) commands, each defining the node and the update to perform on its history. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` array or one of its items is a null reference (Nothing in Visual Basic). |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.

## UpdateNodesHistory(IEnumerable&lt;OpcUpdateNodeHistory&gt;)

Updates the history of the nodes as defined by the `commands` specified using a single history update service request.

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

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> UpdateNodesHistory(
    IEnumerable<OpcUpdateNodeHistory> commands)
```

</div>

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

```vbnet
Public Function UpdateNodesHistory(
    commands As IEnumerable(Of OpcUpdateNodeHistory)) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcUpdateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcupdatenodehistory/)&gt; | A sequence of [OpcUpdateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcupdatenodehistory/) commands, each defining the node and the values to insert into its history or to replace the existing entries with. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items or one of the values of a command is a null reference (Nothing in Visual Basic). |
| [LicenseException](https://learn.microsoft.com/dotnet/api/system.componentmodel.licenseexception) | The license is expired. |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.

## UpdateNodesHistory(params OpcUpdateNodeHistory\[\])

Updates the history of the nodes as defined by the `commands` specified using a single history update service request.

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

```csharp
public IDictionary<OpcNodeId, OpcStatusCollection> UpdateNodesHistory(
    params OpcUpdateNodeHistory[] commands)
```

</div>

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

```vbnet
Public Function UpdateNodesHistory(
    ParamArray commands As OpcUpdateNodeHistory()) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcUpdateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcupdatenodehistory/)[] | An array of [OpcUpdateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcupdatenodehistory/) commands, each defining the node and the values to insert into its history or to replace the existing entries with. |

**Returns**

[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/), [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)&gt;

A dictionary which provides for each node an [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) with the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) instances the server reports for the command.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` array or one of its items or one of the values of a command is a null reference (Nothing in Visual Basic). |

**Remarks**

In case there several commands refer to the same node, the status results of these commands are combined in the collection of that node in the order of the commands. In case there the server reports no status per value for a command, the collection holds the status of the command for the node instead.
