C++
struct resbuf * acdbTblNext( const ACHAR * tblname, int rewind );
File
acedads.h
Description
Scans the specified symbol table and returns either the next entry or the first entry as a result-buffer list.
acdbTblNext() returns information consistent with AutoCAD Release 12 identification format. It does not return the complete symbol table entry, expanded in Release 13 to include the object name, xdata, and persistent reactors attached to the symbol table.
The identification format for symbol table entries returned by these functions consists of a group with a 0 code that contains the name of the table and a group with a 2 code that contains the entry name in the table. These types of objects exist in only one container in the drawing, so the codes are interchangeable with the entry's entity name.
To obtain the entity name of the symbol table entry, call the acdbTblObjName() function.
The tblname argument is the name of one of the read-access symbol tables in the current drawing. The valid values for tblname are LAYER, LTYPE, VIEW, STYLE, BLOCK, UCS, DIMSTYLE, VPORT, and APPID.
The tblname string can be in lowercase; acdbTblNext() converts it to uppercase before passing it to AutoCAD.
When acdbTblNext() is called repeatedly, it normally returns the next entry in the specified table each time. (See acdbTblSearch() for the way to change this default sequence.) If there are no more entries in the table, acdbTblNext() returns NULL. It never returns deleted table entries.
If the rewind argument is nonzero, the symbol table is "rewound" and acdbTblNext() returns the table's first entry. When you begin scanning a table, supply a nonzero rewind argument to rewind the table and find its first entry.
A symbol table entry is returned as a linked list of result buffers with DXF group codes and values.
Entries retrieved from the BLOCK table include a -2 group with the entity name of the first entity in the block definition. If the block is empty, the -2 group contains the name of an endblk entity. By passing the -2 group entity name to acdbEntNext(), you can scan the entities in the block definition and use acdbEntMod() to modify the subentities in the block; acdbEntNext() returns NULL after the last entity in the block definition.
When acdbTblNext() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.
Parameters
Parameters | Description |
---|---|
tblname | Name of the symbol table |
rewind | If zero, returns the next entry in the symbol table; if nonzero, returns the first entry |