# OpcClient.CreateNodesHistory Method

> Reference: Creates historical values 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">2 overloads</span>

| Overload | Description |
|---|---|
| [CreateNodesHistory(IEnumerable&lt;OpcCreateNodeHistory&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/createnodeshistory#createnodeshistory-system-collections-generic-ienumerable-of-opc-uafx-client-opccreatenodehistory) | Creates historical values of the nodes as defined by the `commands` specified using a single history update service request. |
| [CreateNodesHistory(params OpcCreateNodeHistory\[\])](#createnodeshistory-opc-uafx-client-opccreatenodehistory-array) | Creates historical values 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. |

## CreateNodesHistory(IEnumerable&lt;OpcCreateNodeHistory&gt;)

Creates historical values 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> CreateNodesHistory(
    IEnumerable<OpcCreateNodeHistory> commands)
```

</div>

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

```vbnet
Public Function CreateNodesHistory(
    commands As IEnumerable(Of OpcCreateNodeHistory)) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcCreateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opccreatenodehistory/)&gt; | A sequence of [OpcCreateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opccreatenodehistory/) commands, each defining the node and the values to insert into 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 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.

## CreateNodesHistory(params OpcCreateNodeHistory\[\])

Creates historical values 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> CreateNodesHistory(
    params OpcCreateNodeHistory[] commands)
```

</div>

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

```vbnet
Public Function CreateNodesHistory(
    ParamArray commands As OpcCreateNodeHistory()) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcCreateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opccreatenodehistory/)[] | An array of [OpcCreateNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opccreatenodehistory/) commands, each defining the node and the values to insert into 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 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.
