wajidgates Posted December 7, 2013 Posted December 7, 2013 Dear All, Good Day, I am looking for a method to export all the GPS coordinates which have been assigned to each point along with the properties of that point to an excel csv. In our drawings, there are multiple columns and each column has four points and each point has X,Y,Z coordinates. I want to export all this information to an excel sheet. Any idea? Thank You Quote
ReMark Posted December 7, 2013 Posted December 7, 2013 One possibility might be the DATAEXTRACTION command. Quote
SLW210 Posted December 9, 2013 Posted December 9, 2013 Have a look at "Similar Threads" at the bottom of this page. This one Export Coordinates from AutoCAD Help may help. Quote
satishrajdev Posted December 10, 2013 Posted December 10, 2013 Try this :- (Defun C:ExportPMT (/ *error* Smode file dta i theEntity eb pnt txv) (setvar "cmdecho" 0) (Defun *error* (msg) (if (not (member msg '("bad argument type: lselsetp nil" "bad argument type: stringp nil" "quit / exit abort" "Function cancelled" ) ) ) (princ (strcat "\nError: " msg)) ) (princ) (prompt "\n........................................................" ) (princ "\nStatus : Function cancelled") ) (prompt (strcat "\n:: Routine created by Satish Rajdev. ::") ) (initget 1 "P T") (setq Smode (getkword "\nSelect Mode ('P'Point/'T'Text or Mtext):")) (setq file (open (getfiled "Specify Output XYZ File" "c:/" "CSV" 1) "w" ) ) (if (= Smode "P") (progn (write-line "Easting (mE),Northing (mN),Elevation (m)" file ) (while (= dta nil) (setq dta (ssget '((0 . "POINT"))) ) (if (= dta nil) (alert "Please select POINTS to continue...") ) ) (repeat (setq i (sslength dta)) (setq theEntity (ssname dta (setq i (1- i)))) (setq eb (entget theEntity)) (setq pnt (cdr (assoc 10 eb))) (setq txv (rtos (caddr pnt) 2 3)) (write-line (strcat (rtos (car pnt) 2 3) "," (rtos (cadr pnt) 2 3) "," txv ) file ) ) (close file) (setq msg "CSV File is created with extracted POINT details") (alert msg) ) ) (if (= Smode "T") (progn (write-line "Easting (mE),Northing (mN),Text Value" file ) (while (= dta nil) (setq dta (ssget '((0 . "TEXT,MTEXT"))) ) (if (= dta nil) (alert "Please select Text/Mtext to continue...") ) ) (repeat (setq i (sslength dta)) (setq theEntity (ssname dta (setq i (1- i)))) (setq eb (entget theEntity)) (setq pnt (cdr (assoc 10 eb))) (setq txv (cdr (assoc 1 eb))) (write-line (strcat (rtos (car pnt) 2 3) "," (rtos (cadr pnt) 2 3) "," txv ) file ) ) (close file) (setq msg "XYZ File is created with extracted TEXT/MTEXT details") (alert msg) ) ) (prompt "\n........................................................" ) (prompt (strcat "\nStatus : " msg)) (setq *error* nil) (setvar "cmdecho" 1) (princ) ) (princ) (princ "\n:: Type \"ExportPMT\" to Run the Routine ::" ) (princ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.