(defun create
-or
-get
-dict
(location name
/ dict
) ;; is it present?
;;if not present then create a new one
(setq dict
(entmakex '
((0 .
"DICTIONARY")(100 .
"AcDbDictionary")))) ;;if succesfully created, add it to the location
)
;;if present then just return its entity name
)
)
(defun get
-or
-make
-Xrecord
(adict name
/ anXrec
) ;;if name was not found then create it
(100 . "AcDbXrecord")
)
)
)
;;if creation succeeded then add it to our dictionary
)
)
;;if it's already present then just return its entity name
anXrec
)
)
)
(defun add
-to
-Xrecord
(xrec data
) )
(defun list
->dxf
-pairs
(data
) )