Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all.
I'm trying to add xdata, but I can't seem to get it to work.
With the following code, I think the data below -3 is created, but it is not updated.
Is there something wrong with the code?
Thank you very much for your help.
(defun c:test1 (/ var ent app field lst new_xdata)
(setq var (entsel "\nSelect Object"))
(setq ent (entget (car var)))
(setq app "acad" field "test" lst (cons 1040 90.0))
(setq new_xdata (list (cons 1000 field) (cons 1002 "{") lst (cons 1002 "}")))
(setq new_xdata (cons -3 (list (cons app new_xdata))))
(setq ent (reverse (cons new_xdata (reverse ent))))
(entmod ent)
)
Saitoib
Solved! Go to Solution.