Jump to content

xdata lisp


Lord V

Recommended Posts

Firstly I appologise if this is the wrong place to post this query....

 

I am using AutoCad 2008.

 

I need to write a lisp that creates xdata for a polyline. However I appear to have fallen at the first hurdle as I get the following error:

 

xdata Unknown command "XDATA"

 

this is the line I put in the lisp:

 

(command "xdata" "584.6633,523.6835" "field1" "real" "1234" "")

 

When I type the command into CAD xdata runs fine, but when I try to run it via a lisp I get the above error. What am I missing here?

 

This is just a test at the moment as the data for the lisp will be generated by excel (I have alot of data). However I obviously need a lisp that actually works first!

 

Regards

Lord V

Link to comment
Share on other sites

The command Xdata is an Express tool command, their use within a lisp is iffy.

You may want to look into using SetXData method (vla-setxdata....

It's described in Developer Documentation > ActiveX and VBA Reference > Methods

 

BTW, the AutoLisp, VBA... forum would probably be a better place to post your question.

Link to comment
Share on other sites

ok my brain is a little frazzled this afternoon :oops:.

 

I need a line in a lisp to select all objects that have a common point (in this case the start point of a polyline and the insertion points of block attributes in order to turn them into a block)

 

What should I be writting? Im ending up in a nightmare of ssget, ssadd and every other half remembered function.

 

(re-learning lisp with a stinking head cold is never a great idea by the way)

Link to comment
Share on other sites

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...