Thanks kpblc.
I was able to reformat herdsman's original post.
; Task:
; To have in the root dictionary record (xrecord), with the name "NLEADER", which in reality
; on the size of data presentation it corresponds to the record "AcadDim" - by that, which is created for itself
; command QLEADER stores in it tuning user, assigned in appropriate of d/okne.
; At the necessary moment of time the record "AcadDim" is re-named in "QLEADERBACK", and record "NLEADER" - in "AcadDim".
; After fulfillment from the program- shell of the command _ of..tsleader it is necessary not to forget to produce
; reverse renaming to return "AcadDim" to the initial form
; Fragments of the code:
; The creation of X- record, if not in the document:
(setq rootnm (namedobjdict)) ; the name of the object of root dictionary.
(cond ((not (dictsearch rootnm "NLEADER")) ; they are not found tuning NLEADER: (command "_..tsleader")(.chommand)
;; the initialization of regular X- record "AcadDim",
;; if the same does not be present in the figure.
(setq qlrec (dictsearch rootnm "AcadDim"))
(dictadd rootnm
"NLEADER"
(entmakex (append '((0. "XRECORD") (100. "AcDbXrecord"))
(list (assoc 90 qlrec) (assoc 3 qlrec))
; the designation of codes 90 and 3 4 I do not know,
; without them in me command QLEADER rejected to receive the created record; for the "native"
; therefore 4 these data simply I copy from the regular X- record.
'((60. 4) ; without the annotation.
(62 . 2) ; vert. levelling off (0 - 4).
(63 . 0) ; 0 - to emphasize, 1 - framework.
(65 . 0) ; the type of the segments . of severing.
(67 . 2) ; the number of points of indication.
(64 . 0)
(61 . 0)
(66 . 1)
(68 . 0)
(69 . 0)
(70 . 0)
(71 . 0)
(72 . 0)
(40 . 0.0)
(91 . 1) ; Option of conversion (prefix).
(92 . 0) ; Option of conversion (suffix).
)
) ; end append.
) ; end entmakex.
) ; end dictadd.
) ;
) ; end cond.
; Checking:
(cond ((setq qlback (dictsearch rootnm "QLEADERBACK")))
;; theoretically this record there must not be with the regular
;; the completion of the last call of command, since this record had to be conversely renamed in "AcadDim".
;; But if suddenly this not then:
(dictremove rootnm "QLEADERBACK") ; disconnection from the dictionary: this possible and optional action?
(entdel (cdr (assoc -1 qlback))) ; the removal of X- record as primitive);
) ; end cond.
; Renaming the X- records: (command "_..tsleader")(.chommand)
; the initialization of X- record "AcadDim", if the same does not be present in the figure.
(dictrename rootnm "AcadDim" "QLEADERBACK")
(dictrename rootnm "NLEADER" "AcadDim")
(setq qlrec (dictsearch rootnm "AcadDim")) ; now in the X- record "AcadDim" they are contained my tuning.