Thanks, togores, though I have one direct question... How can I obtain list of all registered dictionary names registered through (vlax-ldata-put) function?
This is a bit complicated, as LDATA dictionaries may be "named" or can be assigned to an entity. If it is named, it will be included in the Named Object Dicionary:
_$ (vlax-ldata-put "TESTDICT" "DATA1" "THIS IS A TEST")
"THIS IS A TEST"
_$ (vlax-ldata-get "TESTDICT" "DATA1")
"THIS IS A TEST"
_$ (entget (namedobjdict))
((-1 . <Entity name: 7ffff7038c0>)
(0 . "DICTIONARY")
(330 . <Entity name: 0>)
(5 . "C")
(100 . "AcDbDictionary")
(280 . 0)
(281 . 1)
(3 . "ACAD_CIP_PREVIOUS_PRODUCT_INFO")
(350 . <Entity name: 7ffff7049e0>)
(3 . "ACAD_COLOR")
(350 . <Entity name: 7ffff703bb0>)
(3 . "ACAD_DETAILVIEWSTYLE")
(350 . <Entity name: 7ffff704a30>)
(3 . "ACAD_GROUP")
(350 . <Entity name: 7ffff7038d0>)
(3 . "ACAD_LAYOUT")
(350 . <Entity name: 7ffff7039a0>)
(3 . "ACAD_MATERIAL")
(350 . <Entity name: 7ffff703ba0>)
(3 . "ACAD_MLEADERSTYLE")
(350 . <Entity name: 7ffff704150>)
(3 . "ACAD_MLINESTYLE")
(350 . <Entity name: 7ffff703970>)
(3 . "ACAD_PLOTSETTINGS")
(350 . <Entity name: 7ffff703990>)
(3 . "ACAD_PLOTSTYLENAME")
(350 . <Entity name: 7ffff7038e0>)
(3 . "ACAD_SCALELIST")
(350 . <Entity name: 7ffff7040c0>)
(3 . "ACAD_SECTIONVIEWSTYLE")
(350 . <Entity name: 7ffff704a10>)
(3 . "ACAD_TABLESTYLE")
(350 . <Entity name: 7ffff703c60>)
(3 . "ACAD_VISUALSTYLE")
(350 . <Entity name: 7ffff703ef0>)
(3 . "AcDbVariableDictionary")
(350 . <Entity name: 7ffff703ae0>)
(3 . "TESTDICT") ;; this is our dictionary
(350 . <Entity name: 7ffff704b50>))
If assigned to an entity it will be included as its Extension Dictionary:
_$ (vlax-ldata-put (entlast) "ENTDATA1" "THIS IS ATTACHED TO A CIRCLE")
"THIS IS ATTACHED TO A CIRCLE"
_$ (entget (entlast))
((-1 . <Entity name: 7ffff704be0>)
(0 . "CIRCLE")
(5 . "236")
(102 . "{ACAD_XDICTIONARY")
(360 . <Entity name: 7ffff704bf0>) ;; this ename can be used to get the extension dictionary
(102 . "}")
(330 . <Entity name: 7ffff7039f0>)
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbCircle")
(10 2328.9 2020.6 0.0)
(40 . 178.42)
(210 0.0 0.0 1.0))
_$ (entget (cdr (assoc 360 (entget (entlast)))))
((-1 . <Entity name: 7ffff704bf0>)
(0 . "DICTIONARY")
(330 . <Entity name: 7ffff704be0>)
(5 . "237")
(100 . "AcDbDictionary")
(280 . 1)
(281 . 1)
(3 . "ENTDATA1") ;; this is our dictionary's name
(360 . <Entity name: 7ffff704c00>))
In my acaddoc.lsp I include a call to (vla-load-com) as I use a lot of ActiveX functions in my code, so I don't get the warning message about ActiveX not being loaded.
But on a second thought, something against using LDATA would be that it is not compatible with AutoCAD for MAC. And it seem the future would point to a multiplatform application instead of Windows-only...