I'm having trouble getting this code to update the xdata of an entity.
This is what I'd like the xdata to look like when I query the xdata after the update.
* Registered Application Name: MYAPP
* Code 1013, 3D World space direction: (0.0 0.0 1.0)
* Code 1013, 3D World space direction: (-1.0 0.0 0.0)
* Code 1013, 3D World space direction: (0.0 -1.0 0.0)
What isn't correct here?
Also, I'm sure there is a way to condense this code .......
(If you haven't figured it out yet I'm very new at programming and Autolisp)
(defun c:xd1013 ()
(regapp "MYAPP")
(setq enlst (entget (entlast)))
(setq MYAPP '((-3 ("MYAPP" (list 1013 0.0 0.0 1.0) ))))
(setq newent (append enlst MYAPP))
(entmod newent)
(setq MYAPP '((-3 ("MYAPP" (list 1013 -1.0 0.0 0.0) ))))
(setq newent (append enlst MYAPP))
(entmod newent)
(setq MYAPP '((-3 ("MYAPP" (list 1013 0.0 -1.0 0.0) ))))
(setq newent (append enlst MYAPP))
(entmod newent)
)
Many Thanks!
Solved! Go to Solution.
Solved by gilsonrss. Go to Solution.
Hi,
I believe the correct thing:
(setq MYAPP '((-3 ("MYAPP" (1013 0.0 0.0 1.0) ))))
without the "list" in the last parenthesis