TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Peter2 on January 07, 2021, 06:22:46 AM
-
Is there a tool for a simple display (or handling?) dictionaries? Like the name, the size, the content? The "ArxDbg Utility" covers a part of this functions, but shows mainly the "database background" and not the user-side ...
-
Your question is a bit vague what is it your trying to do, look inside a dictionary.
This shows how to look for a dictionary name. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/listing-dictionaries/td-p/1522830
a example
(defun GetKVPairs (e / return xD esriD att key val)
;Get Key/Value Pairs
(setq return '())
(if (and (setq xD (cdr (assoc 360 (entget e))))
(setq esriD (cdr (assoc -1 (dictsearch xD "ESRI_ATTRIBUTES")))))
(progn
(setq att (entget esriD))
(while (setq att (member (assoc 3 att) att))
(setq key (cdr (car att))
val (cdr (assoc 1 (entget (cdr (car (setq att (cdr att))))))))
(setq return (cons (cons key val) return))
);while
(setq return (reverse return))
);progn
;else
(setq return nil)
);if
return
);defun
-
@BIGAL
thanks, works fine for me.
-
I've normally used the VLIDE, through the watch window. Sometimes dumping results to the log. A bit primitive maybe, but gets the info I need.