Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

exporting coordinates

Status
Not open for further replies.

dt2demar

Technical User
Nov 20, 2000
32
CA

I'm not an experienced autocad user and I need to extract info on coordinates from some *.dwg files.

I've saved the files as *.dxf and browsed the ASCII contents of these files.

I notice that there are several 'AcDb...' features. E.g.
AcDbPolyline
AcDbEntity
AcDbSymbolTableRecord
AcDbLayerTableRecord

I don't know what many of these mean but I suspect they might have something to do with the dbConnect manager.

Anyways, is there a way that I can simply export the coordinates of all polylines, or entities in AutoCad? I'm using ACAD 2000. Apparently each object has a unique 'handle' assigned to it. Essentially what I'd like to have is the coordinates of each 'handle'. For some 'handles' there are multiple coordinates associated with them, eg. those that define a lake.

thanks,

DTD



 
I haven't come across an easy way. A 'relatively' simple lisp routine could be written to do this, that is write the coordinates of all selected objects to a text file. I assume you would just want to do lines, polylines, maybe points & blocks? The routine would be designed to "extract" all the vertices of polylines, insert points of blocks, endpoints of lines, etc. Text file format could be whatever you like, such as :
Entity Type
Coord1
Coord2

For example
LWPOLYLINE
2304.65,4556.98,0.0
etc.
BLOCK INSERT
3468.01,6788.83,100.00
etc.

I wouldn't be surprised if a lisp has already been written to do this or similar, you might try a web search for some freeware.

Regrds,
Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top