sync_attributes_from_excel
Updates existing AutoCAD block attributes from an Excel spreadsheet by matching key TAGs. Preview changes first, then confirm to apply; blank cells keep current drawing values.
Instructions
Atualiza ATRIBUTOS de blocos já existentes casando pela TAG-chave (não insere nem move nada).
QUANDO USAR: a planilha é a fonte da verdade dos dados (TIPO, LINHA, PESO...) e o desenho deve refletí-la. FLUXO SEGURO: dry_run=true (mostra antes→depois, não encontrados e ambíguos); depois confirm=true. Como altera valores em massa, qualquer mudança real exige confirm=true. Um Ctrl+Z desfaz tudo. Parâmetros: path/sheet/header_row, key_tag (atributo-chave, ex. "TAG"; a planilha precisa de coluna com esse nome), block_name (restringe o universo; curinga), mapping ({coluna_excel: "TAG_DO_ATRIBUTO"}; sem mapping, cada cabeçalho é o nome da tag). Célula em branco = mantém o valor do desenho. Exemplo: sync_attributes_from_excel("C:\proj\suportes.xlsx", key_tag="TAG", dry_run=true).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| sheet | No | ||
| confirm | No | ||
| dry_run | No | ||
| key_tag | Yes | ||
| mapping | No | ||
| block_name | No | ||
| header_row | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||