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

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

# AspBlockDetachedEventArgs.AspBlock

Member of [AspBlockDetachedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/AspBlockDetachedEventArgs/index.md).

## AspBlock

Detached 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
public AspBlock AspBlock {get;}
```

Python:

```python
aspBlockDetachedEventArgs.AspBlock: AspBlock
```

### Returns

`AspBlock` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var block = Asp.SymbolTab.AddBlock("My Block");
    block.IsDetachable = true;
    block.Detached += OnBlockDetached;
}

private void OnBlockDetached(AspBlockDetachedEventArgs args)
{
    Print("Block {0} attached: {1}", args.AspBlock.Id, args.AspBlock.IsAttached);
}
```

Python:

```python
def on_start(self):
    block = api.Asp.SymbolTab.AddBlock("My Block")
    block.IsDetachable = True
    block.Detached += self.on_block_detached

def on_block_detached(self, args):
    api.Print(f"Block {args.AspBlock.Id} attached: {args.AspBlock.IsAttached}")
```

