# OpcClient.DeleteNodesHistory Method

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

## DeleteNodesHistory(IEnumerable&lt;OpcDeleteNodeHistory&gt;)

Deletes raw 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> DeleteNodesHistory(
    IEnumerable<OpcDeleteNodeHistory> commands)
```

</div>

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

```vbnet
Public Function DeleteNodesHistory(
    commands As IEnumerable(Of OpcDeleteNodeHistory)) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

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

## DeleteNodesHistory(params OpcDeleteNodeHistory\[\])

Deletes raw 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> DeleteNodesHistory(
    params OpcDeleteNodeHistory[] commands)
```

</div>

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

```vbnet
Public Function DeleteNodesHistory(
    ParamArray commands As OpcDeleteNodeHistory()) As IDictionary(Of OpcNodeId, OpcStatusCollection)
```

</div>

**Parameters**

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