TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: kruuger on March 22, 2017, 11:10:48 AM
-
hello
is it possible to add dictionary with dbx?
like:
(cd:DCT_AddDict (namedobjdict) "ADS_SETTINGS")
thanks
-
As in, using ObjectDBX to side-load a file? Yes, it is. If that's an "AutoCAD owned" dictionary ("ADS" rings a bell) you're responsible for getting everything right.
-
As in, using ObjectDBX to side-load a file? Yes, it is.
You are right but you have to use VL functions to do so. Using entmake is not possible in this case.
-
Essentially use the following process applied to an ObjectDBX Document object:
- vla-get-dictionaries applied to ObjectDBX Document object to obtain Dictionaries Collection
- vl-catch-all-apply 'vla-item on Dictionaries Collection to check if target dictionary already exists
- If dictionary doesn't exist, vla-add to Dictionaries Collection with dictionary name to create it
- vl-catch-all-apply 'vla-getobject on Dictionary object to check if target xrecord already exists
- If xrecord doesn't exist, vla-addxrecord to Dictionary object with xrecord name to create it
- vla-getxrecorddata to obtain existing xrecord data
- vla-setxrecorddata to set xrecord data
-
Essentially use the following process applied to an ObjectDBX Document object:
- vla-get-dictionaries applied to ObjectDBX Document object to obtain Dictionaries Collection
- vl-catch-all-apply 'vla-item on Dictionaries Collection to check if target dictionary already exists
- If dictionary doesn't exist, vla-add to Dictionaries Collection with dictionary name to create it
- vl-catch-all-apply 'vla-getobject on Dictionary object to check if target xrecord already exists
- If xrecord doesn't exist, vla-addxrecord to Dictionary object with xrecord name to create it
- vla-getxrecorddata to obtain existing xrecord data
- vla-setxrecorddata to set xrecord data
hi Lee, thanks for the list. will see if i can handle this.
kruuger