Finds the next item in a dictionary
(dictnext ename [rewind])
The next entry in the specified dictionary; otherwise nil, when the end of the dictionary is reached. Entries are returned as lists of dotted pairs of DXF-type codes and values. Deleted dictionary entries are not returned.
The dictsearch function specifies the initial entry retrieved.
Use namedobjdict to obtain the master dictionary entity name.
Create a dictionary and an entry as shown in the example for dictadd. Then make another Xrecord object:
Command: (setq xname (entmakex datalist))
<Entity name: 1b62d60>
Add this Xrecord object to the dictionary, as the second record in the dictionary:
Command: (dictadd newdict "DATA_RECORD_2" xname)
<Entity name: 1b62d60>
Return the entity name of the next entry in the dictionary:
Command: (cdr (car (dictnext newdict)))
<Entity name: 1bac958>
dictnext returns the name of the first entity added to the dictionary.
Return the entity name of the next entry in the dictionary:
Command: (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:
Command: (cdr (car (dictnext newdict)))
nil
There are no more entries in the dictionary, so dictnext returns nil.
Rewind to the first entry in the dictionary and return the entity name of that entry:
Command: (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.
-
The dictadd, dictremove, dictrename, dictsearch, and namedobjdict functions.