# OpcAddNode Members

> Reference: Defines an abstract base class for a single command of the IOpcAddNodesService used to add one node.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcAddNode</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 [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

### OpcAddNode

<span class="api-meta">protected · 3 overloads</span>

| Overload | Description |
|---|---|
| [OpcAddNode(OpcNodeCategory, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/members#opcaddnode-opc-uafx-opcnodecategory-opc-uafx-opcname)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` defined. |
| [OpcAddNode(OpcNodeCategory, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/members#opcaddnode-opc-uafx-opcnodecategory-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddNode(OpcNodeCategory, OpcName, OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/members#opcaddnode-opc-uafx-opcnodecategory-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` and `nodeId` defined. |

#### OpcAddNode(OpcNodeCategory, OpcName)

<span class="api-meta">protected</span>

Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` defined. The according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) to identify and access the new node is determined by the service.

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

```csharp
protected OpcAddNode(OpcNodeCategory category, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(category As OpcNodeCategory, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `category` | [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) | The [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) which classifies the new node to add regarding one of the classifications defined by the [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) enumeration. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new node can be accessed. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### OpcAddNode(OpcNodeCategory, OpcName, OpcNodeId)

<span class="api-meta">protected</span>

Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node.

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

```csharp
protected OpcAddNode(OpcNodeCategory category, OpcName name, OpcNodeId nodeId)
```

</div>

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

```vbnet
Protected Sub New(
    category As OpcNodeCategory,
    name As OpcName,
    nodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `category` | [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) | The [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) which classifies the new node to add regarding one of the classifications defined by the [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) enumeration. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new node can be accessed. |
| `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/) through that the new node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` or `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddNode(OpcNodeCategory, OpcName, OpcNodeId, OpcNodeId)

<span class="api-meta">protected</span>

Initializes a new instance of the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) class using the specified `category` of node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId`.

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

```csharp
protected OpcAddNode(
    OpcNodeCategory category,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId)
```

</div>

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

```vbnet
Protected Sub New(
    category As OpcNodeCategory,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `category` | [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) | The [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) which classifies the new node to add regarding one of the classifications defined by the [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) enumeration. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new node can be accessed. |
| `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/) through that the new node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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 parent node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

## Properties

### Category

Gets a value indicating the classification of the node in the address space.

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

```csharp
public OpcNodeCategory Category { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Category As OpcNodeCategory
```

</div>

**Property value**

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

One of the members defined by the [OpcNodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/) enumeration which classifies the node within the address space.

### Description

Gets or sets the localized description of the meaning of the node.

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

```csharp
public OpcText Description { get; set; }
```

</div>

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

```vbnet
Public Property Description As OpcText
```

</div>

**Property value**

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

An instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) class which provides the localized description of the node or a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### DisplayName

Gets or sets the localized name of the node.

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

```csharp
public OpcText DisplayName { get; set; }
```

</div>

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

```vbnet
Public Property DisplayName As OpcText
```

</div>

**Property value**

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

An instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) class which provides the localized name of the node or a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### Name

Gets the non-localised human-readable name of the node in the address space.

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

```csharp
public OpcName Name { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Name As OpcName
```

</div>

**Property value**

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

An instance of the [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) class used to identify a node when browsing the address space.

### ParentNodeId

Gets the identifier of the existing parent node of the new node.

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

```csharp
public OpcNodeId ParentNodeId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ParentNodeId As OpcNodeId
```

</div>

**Property value**

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

An instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies an existing node to use as the parent node of the new node.

### SupportsNullNodeId

<span class="api-meta">protected · override</span>

Gets a value indicating whether the [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/) supports instances of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) class its [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#isnull) provides a value equals to the value true.

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

```csharp
protected override bool SupportsNullNodeId { get; }
```

</div>

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

```vbnet
Protected Overrides ReadOnly Property SupportsNullNodeId As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true in the case there the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instance of the command can be a null-node-id; otherwise the value false.

**Overrides**

[SupportsNullNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeservicecommand/members#supportsnullnodeid)

**Remarks**

In case there this property provides the value false and an instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) is passed to the constructor of this class an [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) will be thrown.

### UserWriteAccess

Gets or sets a value which exposes the possibilities of a client to write the attributes of the node taking user access rights into account.

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

```csharp
public OpcAttributeWriteAccess? UserWriteAccess { get; set; }
```

</div>

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

```vbnet
Public Property UserWriteAccess As OpcAttributeWriteAccess?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/)&gt;

One of the members defined by the [OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/) enumeration if specified; otherwise a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### WriteAccess

Gets or sets a value which exposes the possibilities of a client to write the attributes of the node without taking user access rights into account.

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

```csharp
public OpcAttributeWriteAccess? WriteAccess { get; set; }
```

</div>

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

```vbnet
Public Property WriteAccess As OpcAttributeWriteAccess?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/)&gt;

One of the members defined by the [OpcAttributeWriteAccess](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributewriteaccess/) enumeration if specified; otherwise a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.
