How can i import Table made in autocad2000 to excel with same column and rows.
thanks
How can i import Table made in autocad2000 to excel with same column and rows.
thanks
How is your table set up in AutoCAD 2000? Is it an MTEXT, individual TEXTs, or what?
As an MTEXT, your solution is simple: just export it to a file using DDEDIT, then read that file into Excel as a space-delimited file.
For individual TEXT entities, here's a code snippet that will allow you to write a column of a chart at a time out to a file:
Code:;usage: (WriteColumn "C:\\SomeFolder\\OutputFileName.txt") (defun WriteColumn ( strFileSpec / pt ss entText lstTexts filHandle lstOut ) (if (not strFileSpec) (setq strFileSpec "")) ;quick-n-dirty error trap--prevents error during *error* function (setq pt (getpoint "\nIndicate top, left of column: ")) (setq ss (ssget '((0 . "TEXT")))) ;select only text entities ;compose of list of just the text values associated with their distances from the top, left of the column (while (> (sslength ss) 0) (progn (setq entText (entget (ssname ss 0))) (setq lstTexts (append lstTexts (list (cons (distance pt (cdr (assoc 10 entText))) (cdr (assoc 1 entText)) ) ) ) ) (ssdel (ssname ss 0) ss) ) ) ;sort the list into order by increasing distances ("top-to-bottom") (setq lstTexts (vl-sort lstTexts '(lambda (t1 t2) (< (car t1) (car t2))))) ;write the output (setq filHandle (open strFileSpec "w")) (if filHandle (foreach lstOut lstTexts (write-line (cadr lstOut) filHandle)) (*error* (strcat "Unable to open " strFileSpec " for writing output.")) ) (close filHandle) )
Last edited by shawn.bean; 2007-04-02 at 07:36 PM.
Hello,
I'm not used with lisp function so I need help. I don;t know how should I use the function wrote before: I've copy it to a lisp file and I've loaded in autocad drawing but nothing it is going on. What should I do ?
Thank You
Take a look at this article
http://lee-mac.com/runlisp.html
You might be want to try another lisp as well
~'J'~
"The whole problem with the world is that fools and fanatics are always
so certain of themselves, and wiser people so full of doubts."
Bertrand Russell
Thank You very much.
Do You know any place - website, book, where there are lessons for begginers for learning lisp ?
I've some information on the http://lee-mac.com/
Last edited by ala.balaportocala256381; 2011-03-31 at 06:10 PM.
See my response here
http://forums.augi.com/showpost.php?...18&postcount=5
"The whole problem with the world is that fools and fanatics are always
so certain of themselves, and wiser people so full of doubts."
Bertrand Russell