Author Topic: Open DCL and Dictionnary / Ldata  (Read 101 times)

0 Members and 1 Guest are viewing this topic.

pingoo666

  • Mosquito
  • Posts: 11
Open DCL and Dictionnary / Ldata
« on: December 24, 2021, 05:52:55 AM »
Hello everyone,

I try to make a cool GUI for my lisp, and i have an issue.

Some of my code is based on ldatas read and write.

Basically, the user set a property in a tool palette, the ldata of a non graphical entity is modified, and some graphical entities are modified, according to the ldata.

The code works like a charm if I don't use the palette, but once integrated in the palette, the ldata is NEVER modified.

I make a quick try with dictionnaries and I have also an issue, the entmakex doesn't work when I use it in the palette (yes the code is dirty) :
Code: [Select]
(defun c:dctadd (/)
  (setq xname (cdr(assoc -1 (dictsearch (namedobjdict) "MON_SUPER_DICO"))))
  (princl (dictremove xname "SUPER_DATA_2"))
  (setq
      xrec (entmakex '((0 . "XRECORD")
                       (100 . "AcDbXrecord")
                       (70 . 256)
                       )
                       )
)
  (princl xrec)
(dictadd xname "SUPER_DATA_2" xrec) 
)

So I wonder if there a way to write ldata / dictionnaries when using Opendcl or should I use a workaround ?

Thanks by advance, and merry Xmas everyone !