# OpcModellingRules Members

> Reference: Provides the identifiers of the objects representing the modelling rules of OPC UA and the mapping between them and the members of OpcModellingRule.

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

## Fields

### ExposesItsArrayId

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

Provides the identifier of the object representing the modelling rule [ExposesItsArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/#exposesitsarray).

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

```csharp
public static readonly OpcNodeId ExposesItsArrayId
```

</div>

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

```vbnet
Public Shared ReadOnly ExposesItsArrayId As OpcNodeId
```

</div>

**Field value**

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

### MandatoryId

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

Provides the identifier of the object representing the modelling rule [Mandatory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/#mandatory).

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

```csharp
public static readonly OpcNodeId MandatoryId
```

</div>

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

```vbnet
Public Shared ReadOnly MandatoryId As OpcNodeId
```

</div>

**Field value**

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

### MandatoryPlaceholderId

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

Provides the identifier of the object representing the modelling rule [MandatoryPlaceholder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/#mandatoryplaceholder).

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

```csharp
public static readonly OpcNodeId MandatoryPlaceholderId
```

</div>

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

```vbnet
Public Shared ReadOnly MandatoryPlaceholderId As OpcNodeId
```

</div>

**Field value**

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

### OptionalId

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

Provides the identifier of the object representing the modelling rule [Optional](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/#optional).

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

```csharp
public static readonly OpcNodeId OptionalId
```

</div>

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

```vbnet
Public Shared ReadOnly OptionalId As OpcNodeId
```

</div>

**Field value**

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

### OptionalPlaceholderId

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

Provides the identifier of the object representing the modelling rule [OptionalPlaceholder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/#optionalplaceholder).

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

```csharp
public static readonly OpcNodeId OptionalPlaceholderId
```

</div>

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

```vbnet
Public Shared ReadOnly OptionalPlaceholderId As OpcNodeId
```

</div>

**Field value**

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

## Methods

### GetModellingRule

<span class="api-meta">static · since v2.50</span>

Retrieves the according [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) enumeration member for the `nodeId` used by a modelling rule.

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

```csharp
public static OpcModellingRule? GetModellingRule(OpcNodeId nodeId)
```

</div>

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

```vbnet
Public Shared Function GetModellingRule(
    nodeId As OpcNodeId) As OpcModellingRule?
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The identifier of the type definition of a modelling rule. |

**Returns**

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

One of the members defined by the [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) enumeration which represents the type identifier specified or a null reference (Nothing in Visual Basic) if the specific type of rule can't be determined.

### GetNodeId

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

Retrieves the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) for the type of rule defined by the [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) specified by `rule`.

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

```csharp
public static OpcNodeId GetNodeId(OpcModellingRule rule)
```

</div>

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

```vbnet
Public Shared Function GetNodeId(rule As OpcModellingRule) As OpcNodeId
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `rule` | [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) | The [OpcModellingRule](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodellingrule/) value from which the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the rule type is to be determined. |

**Returns**

[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 rule type the `rule` refer to or a null reference (Nothing in Visual Basic) if the `rule` is not a foundation defined rule type.
