# ChangeCommunicationState(Engine, Int32, Int32, Boolean)

{% code title="Declaration" %}

```csharp
public static ChangeCommunicationState(Engine engine, int dataMinerId, int elementId, bool isResponding, bool dve = false, int connectionID = 0)
```

{% endcode %}

{% code title="Example" %}

```csharp
SLNet.ChangeCommunicationState(engine, 1234, 456, true, false, 0);
```

{% endcode %}

{% code title="Result" %}

```csharp
SetDataMinerInfoResponseMessage
```

{% endcode %}

<table><thead><tr><th width="134.33333333333331">Type</th><th width="138">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.Engine.html">Engine</a></td><td>engine</td><td>Interfaces with the DataMiner System from an Automation script.</td></tr><tr><td><a href="https://learn.microsoft.com/dotnet/api/system.int32">Int32</a></td><td>dataMinerId</td><td>The target DataMiner agent ID.</td></tr><tr><td><a href="https://learn.microsoft.com/dotnet/api/system.int32">Int32</a></td><td>elementID</td><td>The target Element ID.</td></tr><tr><td><a href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td><td>isResponding</td><td>Whether the element should be set to responding [<strong>true</strong>] or timeout [<strong>false</strong>].</td></tr><tr><td><a href="https://learn.microsoft.com/dotnet/api/system.boolean">Boolean</a></td><td>dve</td><td>Whether the target element is a DVE.</td></tr><tr><td><a href="https://learn.microsoft.com/dotnet/api/system.int32">Int32</a></td><td>connectionID</td><td>The target connection to set for elements supporting multiple connections [0 for the main connection].</td></tr></tbody></table>

{% hint style="info" %}
If an element supports multiple connections, you can specify which connection state to change (0 for the main connection).
{% endhint %}
