Get Co-ordinates from Drawings
Get Co-ordinates from Drawings
(OP)
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
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





RE: Get Co-ordinates from Drawings
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.
RE: Get Co-ordinates from Drawings
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
RE: Get Co-ordinates from Drawings
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.
RE: Get Co-ordinates from Drawings
i got ur suggestion, i'll try with ssget and get the co-ordinates.
thanks again
gautam1234
RE: Get Co-ordinates from Drawings
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
RE: Get Co-ordinates from Drawings
You can also take a look at To illustrate the entity list of Acad Drawing Objects faq tab by tigrek.
Roberto.