jdbond Posted April 1, 2014 Posted April 1, 2014 who has the lips for transfer cordinate to excel. Quote
Tharwat Posted April 1, 2014 Posted April 1, 2014 Welcome to CADTutor . Do you mean just only the XYZ for points objects in three columns ? Quote
jdbond Posted April 1, 2014 Author Posted April 1, 2014 Yes. when we hit the points or object its can transfer to excelll Quote
ReMark Posted April 1, 2014 Posted April 1, 2014 You're looking for a lisp routine? I doubt you'll find one that works as you have described but there are some that will transfer data between AutoCAD and Excel. Quote
aloy Posted April 1, 2014 Posted April 1, 2014 Remark, Could you give one that transfers from Excel to AutoCAD Quote
Tharwat Posted April 1, 2014 Posted April 1, 2014 Yes. when we hit the points or object its can transfer to excelll Try this and let me know . (defun c:Test (/ f ss o i e p) ;; Tharwat 01.Apr.2014 ;; (princ "\n Select points to write coordinates to file :") (if (and (setq ss (ssget '((0 . "POINT")))) (setq f (strcat (getvar 'dwgprefix) (vl-filename-base (getvar 'dwgname)) ".csv")) ) (progn (setq o (open f "W")) (write-line "X;Y;Z" o) ((lambda (i / n e p) (while (setq n (ssname ss (setq i (1+ i)))) (write-line (strcat (rtos (car (setq p (cdr (assoc 10 (entget n))))) 2) ";" (rtos (cadr p) 2) ";" (rtos (caddr p) 2)) o) ) ) -1 ) (close o) (princ (strcat "\n" f)) ) ) (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.