Finds the next item in a symbol table
(tblnext table-name [rewind])
tblnext is used repeatedly, it normally returns the next entry in the specified table each time. The tblsearch function can set the next entry to be retrieved. If the rewind argument is present and is not nil, the symbol table is rewound and the first entry in it is retrieved.
WhenArguments
"LAYER", "LTYPE", "VIEW", "STYLE", "BLOCK", "UCS", "APPID", "DIMSTYLE", and "VPORT". The argument is not case sensitive.
A string that identifies a symbol table. Valid table-name values arenil, the symbol table is rewound and the first entry in it is retrieved.
If this argument is present and is notReturn Values
nil is returned. Deleted table entries are never returned.
If a symbol table entry is found, the entry is returned as a list of dotted pairs of DXF-type codes and values. If there are no more entries in the table,Examples
Retrieve the first layer in the symbol table:
Command: (tblnext "layer" T)
((0 . "LAYER") (2 . "0") (70 . 0) (62 . 7) (6 . "CONTINUOUS"))
The return values represent the following:
(0 . "LAYER") Symbol type
(2 . "0") Symbol name
(70 . 0) Flags
(62 . 7) Color number, negative if off
(6 . "CONTINUOUS") Linetype name
tblnext is called for that table. When you begin scanning a table, be sure to supply a non-nil second argument to rewind the table and to return the first entry.
Note that there is no -1 group. The last entry returned from each table is stored, and the next one is returned each timeEntries retrieved from the block table include a -2 group with the entity name of the first entity in the block definition (if any). For example, the following command obtains information about a block called BOX:
Command: (tblnext "block")
((0 . "BLOCK") (2 . "BOX") (70 . 0) (10 9.0 2.0 0.0) (-2 . <Entity name: 1dca370>))
The return values represent the following:
(0 . "BLOCK") Symbol type
(2 . "BOX") Symbol name
(70 . 0) Flags
(10 9.0 2.0 0.0) Origin X,Y,Z
(-2 . <Entity name: 1dca370>) First entity
entget and entnext, but not by other entity access functions. For example, you cannot use ssadd to put it in a selection set. By providing the -2 group entity name to entnext, you can scan the entities comprising a block definition; entnext returns nil after the last entity in the block definition.
The entity name in the -2 group is accepted bytblnext is the entity name of its endblk entity.
If a block contains no entities, the -2 group returned by