Adds a nongraphical object to the specified dictionary
Supported Platforms: Windows and Mac OS
(dictadd ename symbol newobj)
Type: ads_name
Name of the dictionary the object is being added to.
Type: String
The key name of the object being added to the dictionary; symbol must be a unique name that does not already exist in the dictionary.
Type: ads_name
A nongraphical object to be added to the dictionary.
Type: ads_name
The entity name of the object added to the dictionary.
As a general rule, each object added to a dictionary must be unique to that dictionary. This is specifically a problem when adding group objects to the group dictionary. Adding the same group object using different key names results in duplicate group names, which can send the dictnext function into an infinite loop.
The examples that follow create objects and add them to the named object dictionary.
Create a dictionary entry list:
(setq dictionary (list '(0 . "DICTIONARY") '(100 . "AcDbDictionary"))) ((0 . "DICTIONARY") (100 . "AcDbDictionary"))
Create a dictionary object using the entmakex function:
(setq xname (entmakex dictionary))(setq xname (entmakex dictionary)) <Entity name: 1d98950>
Add the dictionary to the named object dictionary:
(setq newdict (dictadd (namedobjdict) "MY_WAY_COOL_DICTIONARY" xname)) <Entity name: 1d98950>
Create an Xrecord list:
(setq datalist (append (list '(0 . "XRECORD") '(100 . "AcDbXrecord")) '((1 . "This is my data") (10 1. 2. 3.) (70 . 33)))) ((0 . "XRECORD") (100 . "AcDbXrecord") (1 . "This is my data") (10 1.0 2.0 3.0) (70 . 33))
Make an Xrecord object:
(setq xname (entmakex datalist)) <Entity name: 1d98958>
Add the Xrecord object to the dictionary:
(dictadd newdict "DATA_RECORD_1" xname) <Entity name: 1d98958>