PyAcad 0.4.1

The Entity Name Object

acad_ename (Type: ads.enameType)

The Python representation of an Autocad/Intellicad entity name.

Note that entity names are only valid for the current drawing editor session, so that it usually doesn't make sense to store (pickle etc.) acad_ename objects to disk.

Constructor

Since an acad_ename object is always connected to an existing entity in the drawing database, there can't be a standalone constructor function for this object. Many functions in the ADS module or methods of the acad_ename, acad_sset and acad_systable objects will return acad_ename objects.

Methods

acad_ename.get() -> (acad_cons...)

Get the data of the entity as an association list of acad_cons objects. Returns None if the entity is deleted.

acad_ename.getx()

Not implemented yet.

acad_ename.set(association_list)

Set the data of the entity from an association list of acad_cons objects. If the argument is not a list of valid acad_cons objects for the context of the entity, a ValueError exception is raised.

acad_ename.update()

Update the screen representation of a complex entity, after some of the subentities have been modified. Does nothing if the entity is deleted.

acad_ename.delete()

Delete the entity from the drawing database, or undelete it, if it was previously deleted.

acad_ename.next() -> acad_ename

Returns the next entity in the same database, or None, if there is no next entity. This method allows to iterate through subentities of complex entities and through the entries in the drawing database or the block table.

acad_ename.redraw(mode)

Redraws a single entity according to mode. The mode argument can have the following values:

   ads.RDR_REDRAW       redraw entity
   ads.RDR_UNDRAW       blank out entity
   ads.RDR_HIGHLIGHT    hightlight entity
   ads.RDR_UNHIGHLIGHT  unhighlight entity

After a call with RDR_UNDRAW, the next call for the same entity must use RDR_REDRAW. Equally, RDR_HIGHLIGHT must be followed by RDR_UNHIGHLIGHT, or the effects of the out-of-sequence call will not take effect until later (older Autocad versions may not enforce this).

Use the ads.redraw() function to redraw the complete graphics screen.