dictnext
(dictnext dictionary [flag])
The dictnext function retrieves the next item in a dictionary.
Arguments
dictionary specifies a dictionary entity name.
If flag is present and not nil, the function rewinds the dictionary and retrieves the first entity.
Return Value
The return value is the next entry in the specified dictionary. When the end of the dictionary is reached, the function return nil.
The function returns entries as lists of dotted pairs of DXF-type codes and values. The function does not return deleted dictionary entries.
The examples that follow create objects and add them to the named object dictionary.
Create a dictionary entry list:
dictnext returns the name of the first entity added to the dictionary.
Return the entity name of the next entry in the dictionary:
: (cdr (car (dictnext newdict)))
<Entity name: 1bac960>
dictnext returns the name of the second entity added to the dictionary.
Return the entity name of the next entry in the dictionary:
: (cdr (car (dictnext newdict)))
nil
If there are no more entries in the dictionary, dictnext returns nil.
Rewind to the first entry in the dictionary and return the entity name of that entry:
: (cdr (car (dictnext newdict T)))
<Entity name: 1bac958>
Specifying T for the optional rewind argument causes dictnext to return the first entry in the dictionary.
dictadd, dictremove, dictrename, dictsearch, namedobjdict