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

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

# AspBlock.IsDetachable

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

## IsDetachable

Get / set block detachability, if True user can attach or detach the block.

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 IsDetachable {get; set;}
```

Python:

```python
aspBlock.IsDetachable: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var block = Asp.SymbolTab.AddBlock("My Block");
block.IsDetachable = false;
Print("Block can be detached: {0}", block.IsDetachable);
```

Python:

```python
block = api.Asp.SymbolTab.AddBlock("My Block")
block.IsDetachable = False
api.Print(f"Block can be detached: {block.IsDetachable}")
```

