fix(blocks): block_explode keeps attribute text as TEXT (BURST rule) on both engines
virtual_entities() yields geometry only, so an exploded tagged symbol lost its tag value silently. Every attached ATTRIB now becomes a TEXT at the same WCS placement/height/rotation/style/layer (invisible stays invisible), reported as attribute_texts. COM reads GetAttributes before Explode, deletes the ATTDEF placeholders Explode returns, AddText per value, and deletes the reference ActiveX Explode leaves behind. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
co-authored by
Claude Opus 5
parent
b9510bf377
commit
19610b8f05
@@ -3026,7 +3026,17 @@ async def block_explode(
|
||||
handle: Annotated[str, "Block reference (INSERT) entity handle"],
|
||||
ctx: Context = None,
|
||||
) -> dict:
|
||||
"""Explode a block reference into its individual component entities."""
|
||||
"""Explode a block reference into its component entities, keeping its
|
||||
attribute text (the Express Tools BURST rule, on both engines).
|
||||
|
||||
Every attached ATTRIB becomes a TEXT with the same value, placement,
|
||||
height, rotation and layer (an invisible attribute becomes an invisible
|
||||
TEXT); AutoCAD's plain EXPLODE would keep only the tag-name placeholders
|
||||
and drop the values. Returns `inserted_handles` (the geometry),
|
||||
`attribute_texts` (one TEXT handle per attribute), `exploded_handle` and
|
||||
`backend`. Refused: a handle that is not a block reference (nothing is
|
||||
written). Not undoable except through `drawing_undo` / a transaction.
|
||||
"""
|
||||
await ctx.warning(f"Exploding block reference {handle}")
|
||||
return await _backend(ctx).block_explode(handle)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user