Jump to content

Adding Xdata From Slected Mtext or Text


Recommended Posts

Posted

Hi,

 

I am creating lisp routine and the work is to selected Mtext or text and the corresponding content is to be added as Xdata to the selected entity.

 

 

(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 )))))

)

 

Then I used list Xdata option available under Express tool Tab (Auto Cad 2014). I didn't find any Xdata Attached with it.

 

After Adding the Xdata, I wanna export to Excel.

 

For the Excel Conversion, Lisp is working good.

 

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.

 

With Regards,

Karunakaran.

Posted

Thank you Lee I got it where I missed and the referred info are usefull.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...