Hi,
I am new to Xdata Data handling via Lisp.
I am in need of lisp routine and the work is to selected Mtext or text corresponding content is to be added as Xdata to the selected Entity.
I created a lisp routine also but its not working could anybody help to fix this issue and the code is
(defun C:addxdata()
(setq a(entget(car(entsel"\nSelect Text: "))))
(setq Xdata1 (cdr (assoc 1 a)))
(princ Xdata1)
(setq b(entget(car(entsel"\nSelect Text: "))))
(setq Xdata2 (cdr (assoc 1 b)))
(princ Xdata2)
(regapp "Test_Xdata" )
(setq oldlist (entget (car (entsel))))
(setq thedata '((-3 ("Test_Xdata" (1000 . Xdata1) (1000 . Xdata2 )))))
)
I guess the Problem is in the following line,
(setq thedata '((-3 ("Test_Xdata" (1000 . Xdata1) (1000 . Xdata2 )))))
Eventhough the value stored in variable it is not working properly.
Hi,
Try with this: (setq thedata (list -3 (list "Test_Xdata" (cons 1000 Xdata1)(cons 1000 Xdata2))))
Gaston Nunez
@karunakaran1991 wrote:
I guess the Problem is in the following line,
(setq thedata '((-3 ("Test_Xdata" (1000 . Xdata1) (1000 . Xdata2 )))))
Eventhough the value stored in variable it is not working properly.
Hi karunakaran1991,
please dont start multiple threads on the same subject... it becomes harder to to help...
Have you ever seen the reply to your other Adding Xdata From Slected Mtext or Text
Hope that helps
Henrique