AI Assistant
Notifications
Clear all

CAD TEXT co ordinates to ASCII Text ?

22 Posts
14 Users
0 Reactions
1,969 Views
bharen
(@bharen)
Posts: 50
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 4:05 am
RFB
 RFB
(@rfb)
Posts: 1503
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 5:42 am
Page 2 / 2