Author Topic: Add dictionary with DBX  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

kruuger

  • Swamp Rat
  • Posts: 633
Add dictionary with DBX
« on: March 22, 2017, 11:10:48 AM »
hello
is it possible to add dictionary with dbx?
like:
Code: [Select]
(cd:DCT_AddDict (namedobjdict) "ADS_SETTINGS")thanks

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Add dictionary with DBX
« Reply #1 on: March 22, 2017, 11:41:20 AM »
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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Add dictionary with DBX
« Reply #2 on: March 22, 2017, 11:57:14 AM »
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.

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: Add dictionary with DBX
« Reply #3 on: March 22, 2017, 02:41:56 PM »
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

kruuger

  • Swamp Rat
  • Posts: 633
Re: Add dictionary with DBX
« Reply #4 on: March 23, 2017, 04:42:39 PM »
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