PyAcad 0.4.1

The System Table Objects

acad_systable (Type: ads.systableType)

The Python representation of an Autocad/Intellicad system table.

The systable attribute of the ads module is a dictionary, which holds a number of acad_systable objects. Each of those objects represents one of the system tables of the current drawing database. There can be only one acad_systable object per system table in a drawing session.

The following system tables objects are available:

LAYER  Layers of the current drawing.
LTYPE  Line type definitions of the current drawing.
VIEW  Named views stored in the current drawing.
STYLE  Text styles of the current drawing.
BLOCK  Block definitions in the current drawing.
UCS  Named user coordinate systems stored in the current drawing.
DIMSTYLE  Named dimensioning styles stored in the current drawing.
VPORT  Paperspace viewports in the current drawing.
APPID  Application names registered with the current drawing.

Constructor

There is no public constructor for this object type.

Methods

acad_systable.first() -> assoc_list

Returns the data of the first entry in the system table, or None if the table is empty. The returned data is an association list (a python list of acad_cons objects). This method will set the current position of the table back to the start, so that a following call of the next() method will return the data of the second entry.

acad_systable.next([rewind]) -> assoc_list

Returns the data of the next entry in the system table, of None if the end of the table is reached. The position of this "next" entry is determined by the current position of the table, which is set by a previous call to one of the next() or first() methods, or by a previous call to the search() method with the setnext argument present and not zero. The current position of a table in a newly opened drawing is always at the beginning of the table. If the optional integer argument rewind is present and not zero, then the current position of the table is reset to the beginning, and the effect of the call is identical to that of a call to the first() method.

acad_systable.search(symname [, setnext]) -> assoc_list

Returns the data of the entry in the system table that is stored under the key of the string symname, or None if there is no such entry. If the optional integer argument setnext is present and not zero, then the current position of the table is set to that entry, affecting any following calls to the next() method. If the symname is not a valid symbol name string, a ValueError exception is raised. The function ads.snvalid() can be used to determine if a string represents a valid symbol name.

acad_systable.objname(symname) -> acad_ename

Returns the entity name of the entry in the system table that is stored under the key of the string symname, or None if there is no such entry. This entity name can be used as an argument to some of the ads.entxxx() functions. If the symname is not a valid symbol name string, a ValueError exception is raised. The function ads.snvalid() can be used to determine if a string represents a valid symbol name.

acad_systable.name() -> string

Returns the name of the system table represented by the object.