Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Co-ordinates from Drawings

Status
Not open for further replies.

gautam1234

Civil/Environmental
Aug 9, 2002
4
Hi!
I have drawings done on AutoCAD, the problem is i have to read the X, Y co-ordinates of all entities other than text. (i.e. X, Y co-ordinates of all polylines, points and blocks)

Is there any lisp to read co-ordintes of entities depending upon the layer in which its located.
thanks
 
Replies continue below

Recommended for you

gautam1234
This is exactly what I wanted to do but nobody could help me. This method did work for me though I think there must be a faster way.

Select the part of the object that you wanted the coordinates from.

Type in LIST in the command line

Keep pressing enter until the cycle is complete.

Copy and paste to a text file and remove all of the unwanted data.

Like a say a bit time consuming but faster than going through each point individually.

Andrew299

If any one has a faster way I'd also love to hear it.



 
it also helps if you paste the remainder into excel using the delimiters to seperate the coordintes.
It is also possible to write an excel macro that will remove all non-numeric data and delete blank rows.
If anyone does put a copy on here please
andrew299
 
Hi,

I haven't heard of no program to do that, but what I could suggest is you write your own; some suggestions:

1. make a copy of the drawing to work with, and with the FILTER command select all texts, and delete them

2. select all the entities in a selection set.
(ssget "X")

3. the coordinates are in the dxf 10 and dxf 11, for example:
(10 2.8024 2.24179 0.0)
(11 11.3165 5.75639 0.0)

If you're interested, I can send you a lisp file to grab the last entity's codes, so you can figure out and write your code.

Hope this helps,
Roberto.


 
thanks roberttx!

i got ur suggestion, i'll try with ssget and get the co-ordinates.

thanks again
gautam1234
 
Just to add a comment.

Getting coordinates through LISP is fairly easy for most entity types. There is more logic required for polylines to get all the vertices. Also, do you just need the block insertion point or all of the points within each block insertion?

Just wanted to make sure that you consider these issues.

Bob
 
Hi, gautam1234:

You can also take a look at To illustrate the entity list of Acad Drawing Objects faq tab by tigrek.

Roberto.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor