View Full Version : convert autocad single line texts to txt format
kart_trik
26th Dec 2007, 09:19 am
Dear All,
Is it possible to convert the single line texts which is available in autocad 2008LT to notepad entities.
I have a table (x & y coordinates) in autocad 2008LT . i need these x & y coordinates in notepad format, so that i can use this notepad file in solidworks2007.
is there any other idea that i can use this x&y data in notepad or solidworks
:unsure:
Regards
K.S.Karthik
Product designer
rkmcswain
26th Dec 2007, 02:18 pm
I'm not sure if this is available in LT, but try right clicking on your table, then choose "Export". This will write the table out to a CSV file, which can be opened in Notepad or Excel. (The type in command for this is ._TABLEEXPORT)
kart_trik
27th Dec 2007, 05:35 am
3916
Dear rkmcswain,
I tried the tableexport command as you said, but i am not able to select the table.
please take a look at the table which is available with me in autocad format. i have attached a snap shot of this image.
if you want i will attach this in autocad format also.
Regards:shock:
rkmcswain
27th Dec 2007, 02:09 pm
Is your "table" a true AutoCAD TABLE object, or is it a collection of lines and text?
kart_trik
28th Dec 2007, 05:41 am
it a collection of lines and single line text
Alan Cullen
28th Dec 2007, 06:09 am
Try this lisp. It will write all selected lines of text out to filename.ext :
;;---------------------------------------------------------------------------
;; TXT2ASCI.LSP OUTPUT SELECTED TEXT TO ASCII TEXT FILE
;;================================================ ===========================
;; DESCRIPTION:
;; This routine will write out an ascii text file of the selected text
;;
;; The text lines are sorted by either:
;; 1. as to their vertical location, and are then
;; placed in paragraph form, the text line with the highest 'y' value will
;; be the first line, followed by the text line with the next highest 'y'
;; value, and so on...
;; 2. sorted by order of text line selection.
;;
;; Start Command: txtout
;;
;;
;; Written by: Alan Cullen July 1998
;;
;;--------------------------------ERROR HANDLER------------------------------
(defun clerr (s)
(if (/= s "Function cancelled")
(if (= s "quit / exit abort")
(princ)
(princ (strcat "\nError: " s))
)
)
(command "_.UNDO" "_BACK")
(setq a nil)
(setq ss1 nil)
(setvar "CMDECHO" ocmd)
(if olderr (setq *error* olderr))
(princ "\nERROR...CONSOLE BREAK...ALL TEXT CHANGES HAVE BEEN UNDONE...")
(princ)
)
;;-----------------------------MAIN PROGRAM------------------------------
(defun c:txtout ( )
(setq ocmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq olderr *error* *error* clerr) ;; Set new error handler
(princ "\n EXPORT SELECTED TEXT TO ASCII TEXT FILE - July 1998 - Alan CULLEN")
(princ "\n Select text lines in the order required for output file line number")
(print)
(setq outname (getstring "\n Enter name of OUTPUT FILE (include extension).....: "))
(setq dwgpath (getvar "dwgprefix"))
(setq outname (strcat dwgpath outname))
(setq output (open outname "w"))
(setq sstxt (ssget
'((0 . "TEXT")))
)
(setq n (sslength sstxt))
(setq index 0)
(repeat n
(setq entname (entget (ssname sstxt index)))
(setq txtgrp (assoc 1 entname))
(setq txt (cdr txtgrp))
(write-line txt output)
(setq index (+ 1 index))
)
(close output)
(princ (strcat "\nText has been placed in file \""outname"\""))
(setvar "CMDECHO" ocmd)
(setq *error* olderr) ;; Reset old error handler
(princ)
(princ)
)
Cad64
28th Dec 2007, 06:39 am
kart_trik, I'm afraid you're a bit limited with LT. The lisp routine that Alan posted is what you need, but it will not work for you. You may want to look into getting yourself something like Toolkit Max from www.drcauto.com (http://www.drcauto.com) which will allow you to run lisp routines in LT.
Alan Cullen
28th Dec 2007, 07:01 am
Thanks Cad64. I didn't notice he was using LT. I gotta start being a bit more observant. :oops:
rkmcswain
28th Dec 2007, 02:47 pm
it a collection of lines and single line text
If this is a one-time deal, send me the drawing and I will convert it to a TABLE, then you can export it to a CSV file.
If you need to do this a lot, consider using true TABLE objects instead of lines/text.
kart_trik
31st Dec 2007, 04:51 am
Thanks R.K. McSwain,
I will need this again and again. If I get a very long table i will send it to you. Any how thanks for your help.
Regards
K.S.Karthik
Product designer
Alex_AW
1st Jan 2008, 08:56 am
I don't know if Express tools working under LT, but if it does, you could, if the worst comes to the worst, convert text to mtext and ctrl+C - ctrl+V to any txt editor.
Cad64
1st Jan 2008, 04:45 pm
I don't know if Express tools working under LT, but if it does, you could, if the worst comes to the worst, convert text to mtext and ctrl+C - ctrl+V to any txt editor.
Nope, no Express Tools in LT.
For future reference, you may want to have a look at THIS (http://ltisacad.blogspot.com/2007/09/comparing-full-autocad-to-lt.html) to see a list of what's missing from LT. :wink:
Alex_AW
2nd Jan 2008, 10:17 am
Nope, no Express Tools in LT.
For future reference, you may want to have a look at THIS (http://ltisacad.blogspot.com/2007/09/comparing-full-autocad-to-lt.html) to see a list of what's missing from LT. :wink:
Ok, I've made a slip with my advice. Thanks for the link.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.