Author Topic: add variable extended data  (Read 1455 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
add variable extended data
« on: December 23, 2010, 12:08:21 AM »
all the way back to the autocad help files:
Code: [Select]
(setq exdata '((-3 ("NEWDATA" (1000 . "This is a new thing!")))))
(entmod (append (entget (entlast)) exdata) )

and
Code: [Select]
(entget (car (entsel)) '("NEWDATA"))does retrieve the stored data.

but the quote means the data added cannot have any statements which must be interpreted, I can't use
Code: [Select]
(cons 1000 "This is a new thing!")and have it fly.

without the quote, it interprets -3 or NEWDATA as a command and fails.
with the quote, I have not found a way to interpret the list so it can pass variables.

there is something simple I am missing.
 :cry:
Never express yourself more clearly than you are able to think.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: add variable extended data
« Reply #1 on: December 23, 2010, 12:46:38 AM »
Hi,

Code: [Select]
(list (list -3 (list "NEWDATA" (cons 1000 "This is a new thing"))))
Speaking English as a French Frog

curmudgeon

  • Newt
  • Posts: 194
Re: add variable extended data
« Reply #2 on: December 23, 2010, 01:37:19 AM »
Yes, thank you very much.
Never express yourself more clearly than you are able to think.