export_blocks_to_excel
Exports AutoCAD block data to an Excel .xlsx table with handles, layers, coordinates, rotation, scale, and tags, creating an editable spreadsheet for reimport and attribute sync.
Instructions
Exporta blocos para .xlsx: HANDLE, BLOCO, CAMADA, X, Y, Z, ROTACAO, ESCALA_X/Y/Z + uma coluna por TAG.
QUANDO USAR: gerar a lista/tabela de suportes do desenho, ou obter uma planilha-modelo para depois editar e reimportar (o arquivo gerado é aceito por import_blocks_from_excel e sync_attributes_from_excel). Só lê o desenho. Se o arquivo já existir, sobrescrever exige confirm=true (a planilha tem aba INFO com a unidade). Parâmetros: block_name (curinga * e ?), path (.xlsx, caminho na máquina do usuário), layer (opcional), sheet_name, confirm. Coordenadas na unidade do desenho. Exemplo: export_blocks_to_excel("SUP-*", "C:\proj\suportes.xlsx", layer="SUPORTES").
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"block_name": "<block_name>",
"path": "<path>"
},
"name": "export_blocks_to_excel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| layer | No | ||
| confirm | No | ||
| block_name | Yes | ||
| sheet_name | No | Blocos |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||