Jump to content

Lisp: coordinates of points to excel sheet (+point number)


Recommended Posts

Posted

Yes i want this lisp because i give the co-ordinate the surveyors for stake out...so give me your lisp file and tell me how i use it and take coordinate from autocad to excel

Posted

Just GREAT

use this succesfuly.

Thanks

  • 1 month later...
Posted

Dear Sir,

 

I like the lisp used for exporting coordinate X,Y,Z. Do possible to change the Elevation Z to Length of the Drawing, and remain output of Coordinate X and Y?

  • 4 months later...
Posted
stevesfr

what version MS OFFICE do you use ? (I did not test with Office 2007)

In any case I have a little changed programs. Now it is possible to keep in a text file csv or txt a format.

If option Excell does not work, try option Text file (csv a format) and to answer "YES" inquiry "Open text file? [Yes/No] :"

 

Commands:

COOR - export of coordinates

COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)

COORT-export of coordinates with numbering where number considers the text nearest to a point

CoorNP-Coordinates + Numbers + Points. Draw points with current value of PDMODE and PDSIZE

COORNB - CoorNB-Coordinates + Block (Numbers + Points)

 

...

Rev9 - 2014-05-05 Settings (export XYZ YXZ; round)

 

HI, My friend i need ur help when i use CoorNP command and try to save it in text file there is comma "," missing in between Numbers E N Z

  • 4 months later...
Posted

it worked just fine until suddenly giving me this when i run and select a polyline

Select objects: ; error: no function definition: nil

 

any thoughts on how to make it work

  • 4 months later...
Posted

Hi, I have used this LISP Routine with great success, however im running into a problem when working in a UCS. The coordinates output in the current UCS which is what i want, but the text is drawn in the world system. Which means i have to move the text and rotate it back to the ccorrect position. Is this something i am doing wrong or is there a Workaround for this?

Posted

(defun c:Test0008 (/ p1 oFile sFile tmp Separator i
;|Functions|; GetFormatFile aux:SelectFile grdx
)
;;_________________________________________________
(defun GetFormatFile (/ lsts)
(or *Format* (setq *Format* "csv"))
(setq lsts '(("csv" ";" "[<Csv>/Txt/Xls]")
("txt" " " "[Csv/<Txt>/Xls]")
("xls" "\t" "[Csv/Txt/<Xls>]")))
(setq mens (last (assoc *Format* lsts)))
(initget "Csv Txt Xls _csv txt xls")
(if (setq tmp (getkword (strcat "\nFormat file;" mens ": ")))
(setq *Format* tmp)
)
(setq Separator (cadr (assoc *Format* lsts)))
)
;;_________________________________________________
(defun aux:SelectFile ( Extension / ff)
(if (setq ff (getfiled "Select File" (if *TmpRutaFile* *TmpRutaFile* "") Extension 1))
(setq *TmpRutaFile* (strcat (vl-filename-directory ff) "\\"))
);c.if
ff
);c.defun
;;_________________________________________________
; grdx - graphic cross utility
(defun grdx (p col size / h)
(setq h (/ (getvar "viewsize") size))
(grdraw (list (- (car p) h) (- (cadr p) h))
(list (+ (car p) h) (+ (cadr p) h)) col 0)
(grdraw (list (- (car p) h) (+ (cadr p) h))
(list (+ (car p) h) (- (cadr p) h)) col 0)
p
);c.defun
;;--------------------- MAIN -----------------
(or *Prec* (setq *Prec* 4))
(setq p1 (getpoint "\nPick first point: "))
(while p1
(grdX p1 213 125)
(setq lstFile (cons p1 lstFile))
(setq p1 (getpoint " >> Pick Next point: "))
)
(cond
(lstFile
(initget (+ 4))
(if (setq tmp (getint (strcat "\nPrecisión;<" (itoa *Prec*) ">: ")))
(setq *Prec* tmp)
)
(GetFormatFile)
(setq sFile (aux:SelectFile *Format*))
(cond
(sFile
(setq i 1)
(setq oFile (open sFile "w"))
(write-line "COORDINATES OF POINTS" oFile)
(write-line (strcat "#" Separator "X" Separator "Y" Separator "Z") oFile)
(mapcar
(function
(lambda (pt)
(write-line (strcat (itoa i) Separator
(rtos (car pt) 2 *Prec*) Separator
(rtos (cadr pt) 2 *Prec*) Separator
(rtos (last pt) 2 *Prec*)
)
oFile)
(setq i (1+ i))
)
)
lstFile
);c.mapcar
(close oFile)
(alert (strcat "File: \n\n[" sFile "]\n\nhas been created."))
;;(startAPP (strcat "notepad.exe " sFile))
(command "shell" (strcat "start " sFile))
)
)
)
);c.cond
(princ)
)
(princ)

 

 

1b1K3T012C2a

medium.gif

  • 3 years later...
Posted (edited)

DWG AREA.jpg

MODEL WORK.dwg R5 tabord3.lsp

 

Hi Guys

 

I come to ask for an adaptation in a table, I will post the images and attachment to better understand,

I'm grateful for help.

 

As this is important to me, I will make a donation of 20 U$ for those who can, as thanks for the help.

bye

 

 

 

Edited by leo321
edit text

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...