Notifications
Clear all

CAD TEXT co ordinates to ASCII Text ?

22 Posts
14 Users
0 Reactions
9 Views
(@bharen)
Posts: 50
Registered
 

Not sure how your workflow needs to go, or how many points you have, but you can always cut and paste the data out of the Geometry table for each of the objects or blocks. Just right click on the block and select properties.

Do you have a GIS package like ArcView or ArcInfo? You can always export the CAD layer to a shapefile in AutoCAD, bring it in to GIS and use the Calculate Geometry table command to add the x and y columns to the data table, and then export that as a text file to Excel. It sounds complicated, but it actually takes longer to describe than it does to actually do it.

Brian

 
Posted : May 9, 2011 2:05 am
 RFB
(@rfb)
Posts: 1504
Registered
 

If the GH field are ACAD entities, this will do it:

XYZEX.LSP

Invoke the command and select the entites, it will create an ASCII file in the path specified, you can change that path with a text editor if you wish.

It extracts the N and E as well as the Z.

;
;
; Rick Berg
;
; 1-09-97
;
; X,Y,Z EXtraction
;
(defun c:xyzex ()
(setq ss (ssget))
(setq ssl (sslength ss))
(setq cnt 0)
(repeat ssl
(setq x (rtos (car (cdr (assoc 10 (entget (ssname ss cnt))))) 2 5))
(setq y (rtos (cadr (cdr (assoc 10 (entget (ssname ss cnt))))) 2 5))
(setq z (rtos (caddr (cdr (assoc 10 (entget (ssname ss cnt))))) 2 5))
(setq fil (open "c:rfbPNT.TXT" "a"))
(setq str (strcat x "," y "," z))
(write-line str fil)
(setq cnt (+ cnt 1))
(close fil)
)
(princ)
)

 
Posted : May 9, 2011 3:42 am
Page 2 / 2