Is there an easier way to get a list of co ordinates that are either individual text strings or a block of mtext in a CAD drawings straight into an ASCII text or excel CSV file ?
Copy and paste does not work, the only way I can do it is to print the text to a PDF file and use Optical character recognition software to scan and recognize the text. This is a pain as the quality gets degraded, its a digital to analogue back to digital conversion and the OCR software often mixes up the "8" for a "B"
I am using Autocad, and would love to find a lisp routine that will read the cad text and dump it to ASCII.
Thank
Lee
When I can't cut/paste to notepad I do it almost like you. I screen cap the text as an image and use Online OCR Only takes a couple minutes and sure beats typing them over.
There must be an easier way
, it is digital text, getting it to another format of digital text must be possible. I often find errors in the OCR, so have to check every co ordinate, takes almost the same amount of time as typing them in again.
Lee
There must be an easier way
I use a command called "textout" and "textin" (for the reverse). Works well.
There should be a LISP somewhere on the internet for this for regular AutoCAD, don't know where.
Good luck,
:beer:
How come it does not surprise me that "dear" autodesk made importing/ exporting points more difficult.... used to be so easy...... I have not had the chance to play with the new autocad. The "improvements" they are making do not seem to benefit surveyors for the past few years....
In AutoCad, I used to clean a drawing up to where it only had the points on the display and then "plot to file". The plot file generated (by what plotter, I can't remember...probably an old CalComp) was in ascii format and could be dressed up in any text editor (notepad) a little to have x,y,z,d.
Here is a block of text strings representing the co-ordinates, in Autocad that I want to convert to ASCII, if only I could copy the block and paste into into a text editor, all would be great.
EXACTLY why I swithched to Carlson with embedded AutoCad!! Carlson has all of the survey tools I want and a bunch of stuff that I could not do in Autocad.
I work for a survey company. I do not need all the stuff in C3D, just the survey part. Why pay for what I will never use, yet get caught up with all the mess they have added?
My company converted 8 seats to Carlson Survey and we have not looked back since. The money we saved was a great benefit.:-)
Try Terry Dotson's site. If no findee, post a dwg with the text you want to use and we'll see what can be done.
http://dotsoft.com/freestuff.htm
maybe this is the one you need: TXTEXPRT.LSP
Is that an image file or a text string?
or a block with attributes?
depends on what it is,on how you can obtain the data.
Please forgive me if I'm miss-understanding your question. I have copied many tabled coordinate list from AutoCAD onto a notepad file which will save as .txt. You say it is a block, that should allow you to use the "block editor" and delete the table lines (or just maybe just explode the block), then copy the text (while still in the block editor), paste said text onto notepad (not any word processors), then save. Open the saved .txt file with excel, you will be prompted for delineation, tell it "comma separated" and it will place the values in excel's rows and columns. You can now save the excel file (after any minor cleanup) as a .csv file. The .csv is importable into many other programs but you can also simply change the file extension from .csv to .txt and it will open as a text file. I hope this is what you are looking for?
Good Luck!
CV
Sorry Steve, I thought I replied to "PDOD":-P
PDOP,
If my solution doesn't work, feel free to e-mail me your drawing (or even better just write out the block) and I can extract the values out for you, downside is I cant do it till Monday am.
The co ordinates are usally lines of individual text strings , or a block of mtext, often pasted into the paper space viewport of the final plot of the plan.
The list I pasted was a jpeg conversion of a pdf of the cad drawing that I pdf'd out. I usally use Scansoft to do OCR on this jpeg and get the co ordinates to ASCII.
I am only using Autocad , no add ons.
Lee
HI CV
I have tried that method before and retried it as you described, I am using textpad as an editor, but when copying the text in Autocad, nothing will paste into the editor.
In this CAD drawing table ( See above post for layout) each line and column is an individual text string. If I get DXF files they are already individual text strings as DXF does not support Mtext, but sometimes if it's a Autocad file, it is a block of mtext.
If you are writing a block of mtext, you cannot paste text into it, you have to import the text into it, I am assuming it is converting the ASCII to a CAD format in this operation.
I will keep trying as you suggest.
Thanks
Lee
Well, here goes . . not simple but simpler than typing them in. I'd start with the txt2mtxt command (Express tools) and select each text entity left to right in sequence PENZ for your example, and do that for each row. Then use this lisp routine shared by Joe Burke on an Autodesk discussion group, selecting each row in order to join the individual lines of mtext.
;; Join mtext demo.
;; The order of selection determines the result.
;; The first mtext object selected is modified and
;; others are deleted.
(defun c:jmtx ( / e obj lst str)
(while
(and
(setq e (car (entsel "nSelect mtext: ")))
(setq obj (vlax-ename->vla-object e))
(equal "AcDbMText" (vlax-get obj 'ObjectName))
)
(setq lst (cons obj lst))
)
(setq obj (last lst))
(setq str (vlax-get obj 'TextString))
(foreach x (cdr (reverse lst))
(setq str (strcat str "P" (vlax-get x 'TextString)))
(vla-delete x)
)
(vlax-put obj 'TextString str)
(princ)
)
Then, lastly set your Autocad text editor to an alternate editor like notepad with mtexted -> notepad.
Highlight the mtext and save it as you see fit.
Peter
Thanks, I will try it out.
Lee
Tried two different lisp routines got from the Terry Dotson's site, they can grab the cad text and put hem in a text file, but it dumps all the individual co ordinates in a sequential file each one on its own line, not in a table format, so you can't really do much with it, unless you want to do some heavy editing.
Tried pulling them out column by column, but it gets the sequences mixed up so when pulling in all the columns, the co ordinate values are incorrect for that point number.
The text to mtext routine does the same thing, dumps 1 ordinate on 1 line in one long thin mtext block.
Looks like OCR is the only way to go so far.:-(
Is This A New Autodesk Stimy ?
A surveyor I work with has Carlson Survey (AutoCAD 2011) on his laptop. Certain arc labeling text is displayed on the screen in an uneditable format. In the past text edit from the pull down would open and allow text editing in a block, but have not found the key to the new format.
I suspect Autodesk has thrown a new gimmick in to push users to their proprietary garbage.
Paul in PA
Is This A New Autodesk Stimy ?
I ran into this issue a few times, in past while. It was new to me. You may want to try using the properties box (by typing properties or "1" in my case) to edit the text. This method works for me.
:beer:
Windowing the text will give the results you describe. For the txt2mtxt routine to work you need to select the p then e then n, then z in that order for one row then right click. Re-start the command with another right click do the same continuing down the point list. Then after each point has been converted to individual mtext strings, then you run the jmtxt routine and combine all the mtext to one mtext entity. Set the alternate text editor to notepad and open it in notepad and save as needed. Works for me to create a space delimited ascii file.
Good luck,
Peter