Entity Mixin¶
Low-level entity property access and deletion by handle.
adapters.mixins.entity_mixin.EntityMixin
¶
Mixin for entity property operations.
delete_entity
¶
Delete a drawing entity identified by its COM handle.
| PARAMETER | DESCRIPTION |
|---|---|
handle
|
The entity handle string as returned by AutoCAD COM.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if deleted successfully, False otherwise. |
get_entity_properties
¶
Retrieve common properties of a drawing entity via COM.
| PARAMETER | DESCRIPTION |
|---|---|
handle
|
The entity handle string as returned by AutoCAD COM.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Dict[str, Any]
|
Dictionary with keys: handle, object_name, layer, color, lineweight. |
Dict[str, Any]
|
Returns an empty dict if the entity cannot be accessed. |
set_entity_properties
¶
Modify one or more properties of a drawing entity via COM.
Supported keys in properties: layer (str), color (str or int ACI
index), lineweight (int).
| PARAMETER | DESCRIPTION |
|---|---|
handle
|
The entity handle string as returned by AutoCAD COM.
TYPE:
|
properties
|
Dictionary of property names to new values.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the update succeeded, False otherwise. |