# OpcNodeModel Members

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

## Properties

### Directive

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

```csharp
public OpcModellingDirective Directive { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Directive As OpcModellingDirective
```

</div>

**Property value**

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

### Name

<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/)

### None

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

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

```csharp
public static OpcNodeModel None { get; }
```

</div>

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

```vbnet
Public Shared ReadOnly Property None As OpcNodeModel
```

</div>

**Property value**

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

## Methods

### Child

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

```csharp
public OpcNodeModel Child(OpcName name)
```

</div>

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

```vbnet
Public Function Child(name As OpcName) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) |  |

**Returns**

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

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

### Children

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

```csharp
public IEnumerable<OpcNodeModel> Children()
```

</div>

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

```vbnet
Public Function Children() As IEnumerable(Of OpcNodeModel)
```

</div>

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/)&gt;

### ChildrenWith

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

```csharp
public IEnumerable<OpcNodeModel> ChildrenWith(OpcModellingRule rule)
```

</div>

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

```vbnet
Public Function ChildrenWith(
    rule As OpcModellingRule) As IEnumerable(Of OpcNodeModel)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `rule` | [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) |  |

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/)&gt;

### Create

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

| Overload | Description |
|---|---|
| [Create(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#create-opc-uafx-opcname) |  |
| [Create(OpcName, bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#create-opc-uafx-opcname-system-boolean) |  |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

#### Create(OpcName)

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

```csharp
public OpcNodeModel Create(OpcName name)
```

</div>

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

```vbnet
Public Function Create(name As OpcName) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) |  |

**Returns**

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

#### Create(OpcName, bool)

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

```csharp
public OpcNodeModel Create(OpcName name, bool recursive)
```

</div>

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

```vbnet
Public Function Create(name As OpcName, recursive As Boolean) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) |  |
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |

**Returns**

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

### CreateByDefault

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

| Overload | Description |
|---|---|
| [CreateByDefault()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#createbydefault-noparams) |  |
| [CreateByDefault(bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#createbydefault-system-boolean)<span class="api-meta">since v2.51</span> |  |

#### CreateByDefault()

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

```csharp
public OpcNodeModel CreateByDefault()
```

</div>

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

```vbnet
Public Function CreateByDefault() As OpcNodeModel
```

</div>

**Returns**

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

#### CreateByDefault(bool)

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

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

```csharp
public OpcNodeModel CreateByDefault(bool recursive)
```

</div>

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

```vbnet
Public Function CreateByDefault(recursive As Boolean) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |

**Returns**

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

### CreateIf

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

| Overload | Description |
|---|---|
| [CreateIf(Func&lt;OpcName, bool&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#createif-system-func-of-opc-uafx-opcname-system-boolean) |  |
| [CreateIf(Func&lt;OpcNamePath, bool&gt;, bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#createif-system-func-of-opc-uafx-opcnamepath-system-boolean-system-boolean) |  |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

#### CreateIf(Func&lt;OpcName, bool&gt;)

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

```csharp
public OpcNodeModel CreateIf(Func<OpcName, bool> predicate)
```

</div>

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

```vbnet
Public Function CreateIf(predicate As Func(Of OpcName, Boolean)) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `predicate` | [Func](https://learn.microsoft.com/dotnet/api/system.func-2)&lt;[OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/), [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)&gt; |  |

**Returns**

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

#### CreateIf(Func&lt;OpcNamePath, bool&gt;, bool)

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

```csharp
public OpcNodeModel CreateIf(Func<OpcNamePath, bool> predicate, bool recursive)
```

</div>

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

```vbnet
Public Function CreateIf(
    predicate As Func(Of OpcNamePath, Boolean),
    recursive As Boolean) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `predicate` | [Func](https://learn.microsoft.com/dotnet/api/system.func-2)&lt;[OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/), [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)&gt; |  |
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |

**Returns**

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

### CreateLike

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

```csharp
public OpcNodeModel CreateLike(IOpcNodeInfo node)
```

</div>

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

```vbnet
Public Function CreateLike(node As IOpcNodeInfo) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) |  |

**Returns**

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

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

### CreateOptionals

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

```csharp
public OpcNodeModel CreateOptionals()
```

</div>

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

```vbnet
Public Function CreateOptionals() As OpcNodeModel
```

</div>

**Returns**

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

### Of

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

Creates the model a node type defines for its instances.

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

```csharp
public static OpcNodeModel Of(IOpcNodeTypeInfo nodeType)
```

</div>

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

```vbnet
Public Shared Function [Of](nodeType As IOpcNodeTypeInfo) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeType` | [IOpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodetypeinfo/) | The [IOpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodetypeinfo/) whose model is to be created. |

**Returns**

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

A new instance of the [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) class with the children of the `nodeType` and their attributes.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeType` is a null reference (Nothing in Visual Basic). |

**Remarks**

A node created without a model keeps the defaults of the SDK, such as a variable that clients can read and write. A node created with the model of its type takes the attributes the type defines instead, such as the access levels a companion specification declares in its NodeSet. The node manager can pass it once the NodeSet is imported, for example in `CreateNodes`:

```csharp
var type = this.SystemContext.GetNodeType(OpcMachineryNodes.MachineIdentificationType);
var identification = new OpcMachineIdentificationNode(OpcNodeModel.Of(type), machine, name);
```

### OmitByDefault

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

| Overload | Description |
|---|---|
| [OmitByDefault()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#omitbydefault-noparams) |  |
| [OmitByDefault(bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#omitbydefault-system-boolean)<span class="api-meta">since v2.51</span> |  |

#### OmitByDefault()

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

```csharp
public OpcNodeModel OmitByDefault()
```

</div>

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

```vbnet
Public Function OmitByDefault() As OpcNodeModel
```

</div>

**Returns**

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

#### OmitByDefault(bool)

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

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

```csharp
public OpcNodeModel OmitByDefault(bool recursive)
```

</div>

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

```vbnet
Public Function OmitByDefault(recursive As Boolean) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |

**Returns**

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

### OmitOptionals

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

| Overload | Description |
|---|---|
| [OmitOptionals()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#omitoptionals-noparams) |  |
| [OmitOptionals(bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/members#omitoptionals-system-boolean)<span class="api-meta">since v2.51</span> |  |

#### OmitOptionals()

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

```csharp
public OpcNodeModel OmitOptionals()
```

</div>

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

```vbnet
Public Function OmitOptionals() As OpcNodeModel
```

</div>

**Returns**

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

#### OmitOptionals(bool)

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

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

```csharp
public OpcNodeModel OmitOptionals(bool recursive)
```

</div>

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

```vbnet
Public Function OmitOptionals(recursive As Boolean) As OpcNodeModel
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `recursive` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |

**Returns**

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

### ToString

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

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

```csharp
public override string ToString()
```

</div>

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

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

**Overrides**

[ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)
