Herr_Manu Posted October 12, 2021 Share Posted October 12, 2021 Hi there Does anyone know how to get the Name of a existing Dictionary? and secondly, how to print the values stored in them? (defun c:dicttest (/ dictionaries DictName dictList) (vl-load-com) (setq dictionaries (vla-get-Dictionaries (vla-get-activedocument (vlax-get-acad-object)))) (setq dictList '()) (vlax-map-collection dictionaries '(lambda (theDict) (setq DictName (vlax-get-property theDict 'Name)) (setq dictList (cons DictName dictList)) ) ) ;vlax-map-collection (foreach itm dictList (princ itm)) (princ) ) ;defun Thanks for the comments. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted October 12, 2021 Share Posted October 12, 2021 (edited) Maybe: (mapcar 'print (dictsearch (NAMEDOBJDICT) "ACAD_LAYOUT")) And maybe this: (foreach x (entget (namedobjdict)) (if (= 3 (car x)) (print (cdr x)) ) ) And this: (defun c:dicttest (/ l) (vl-load-com) (vlax-for d (vla-get-dictionaries (vla-get-activedocument (vlax-get-acad-object))) (if (vlax-property-available-p d 'name) (setq l (cons (list (vla-get-name d) d) l)) ) ) (mapcar 'print l) ) Edited October 12, 2021 by ronjonp 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.