---
id: "P:cAlgo.API.AspBlock.IsAttached"
kind: "property"
type: "T:cAlgo.API.AspBlock"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/IsAttached/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# AspBlock.IsAttached

Member of [AspBlock](https://help.ctrader.com/ctrader-algo/references/Plugin/Asp/AspBlock/index.md).

## IsAttached

Get / set block attached / detached state.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
bool IsAttached {get; set;}
```

Python:

```python
aspBlock.IsAttached: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var block = Asp.SymbolTab.AddBlock("My Block");
block.IsDetachable = true;
block.IsAttached = false;
Print("Block is attached: {0}", block.IsAttached);
```

Python:

```python
block = api.Asp.SymbolTab.AddBlock("My Block")
block.IsDetachable = True
block.IsAttached = False
api.Print(f"Block is attached: {block.IsAttached}")
```

