View Full Version : Point Export ACADR14
Randal Cullen
12th May 2005, 04:32 pm
I would like to export the xy position of points plotted in an ACADR14 DWG or DXF file to a comma or space delimited text file in the general format of point, x,y
I am looking for a LISP routine to do this. I have already tried PointExport from the internet (Shareware $30) but it doesn't work in ACADR14.
:oops:
David Bethel
12th May 2005, 04:48 pm
Here is a quick down and dirty ditty:
(defun c:p2f (/ odz ss i en ed pp wf)
(setq odz (getvar "DIMZIN"))
(setvar "DIMZIN" 8)
(while (not ss)
(princ "\nSelect Points To Export...")
(setq ss (ssget '((0 . "POINT")))))
(setq i (sslength ss)
wf (open "TEST.DAT" "w"))
(while (not (minusp (setq i (1- i))))
(setq en (ssname ss i)
ed (entget en)
pp (cdr (assoc 10 ed)))
(write-line (strcat (rtos (car pp) 2 8) "," (rtos (cadr pp) 2 8)) wf))
(close wf)
(setvar "DIMZIN" odz)
(prin1))
DWG files only. From Within full ACAD.
Exports POINT entities only.
DIMZIN controls the trailing zeros, I use 8 to supress them.
Output file name is TEST.DAT in the current working directory.
-David
Randal Cullen
13th May 2005, 09:03 am
BONZA!
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.