Print Page | Close Window

converting lines to text

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=14634
Printed Date: 18.May.2026 at 21:29


Topic: converting lines to text
Posted By: jolasamuel
Subject: converting lines to text
Date Posted: 24.Oct.2024 at 16:30
hello

i have some text made of the combination of horizontal lines and i want to convert them from lines to normal AutoCAD text. how do i go about this, any lisp or command to use? I have attached a part I have attached a part of the text below.

https://www.cadforum.cz/forum_en/uploads/937374/Drawing2.dwg" rel="nofollow - uploads/937374/Drawing2.dwg  



Replies:
Posted By: rahul7civil
Date Posted: 07.Nov.2024 at 06:12
Hi there,
Find your drawing in that discussion forum is a research project.
You can get the poly line into the text is a bit more complicated using automatic language. If you are doing in the manual is better than automatic functions.
Thanks 


-------------
Rahul Banerjee


Posted By: Vladimir Michl
Date Posted: 07.Nov.2024 at 07:11
It would be quite complicated in LISP. But you can try to export the lines to PDF and then bring back the PDF to AutoCAD with the option "Convert text" enabled. It should recognize real texts. Or the OCR function in AutoCAD Raster Design can do that.

-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner


Posted By: Kent Cooper
Date Posted: 07.Nov.2024 at 18:17
Originally posted by Vladimir Michl Vladimir Michl wrote:

It would be quite complicated in LISP. ....

Never mind complicated -- I wonder whether it would even be possible, but I doubt it.  How AutoLisp could determine which Polylines belong together to represent a letter is beyond my comprehension.  They're not affiliated with each other in any meaningful way, for example, the red ones along the top here:

are sequential in the drawing order, so looking at sequential series of Polylines is never going to identify letter groupings.  Proximity could not be used, because from many starting Polylines to measure from, there are others that are part of different letters closer than some of those that are part of the same letter.  And here are a few of the configurations of (arbitrarily) M and E:

Does it take 57 Polylines to represent an M, or 52?  11 to represent an E, or 14, or 15?  The second and third E's look like they might be duplicates, but their longer horizontal parts are of different lengths.  The third one has the bottom leg longer than the top arm, though those are the same lengths in the others.

Even if it were possible to determine that the upper left clump of Polylines there belong together to represent a letter, I cannot imagine by what functions AutoLisp could possibly decide that it's an "M".  But I'd be interested in anyone's thoughts on how that might be determinable.


Posted By: philippe JOSEPH
Date Posted: 08.Nov.2024 at 08:02
Yes an OCR would eventually recognize only true type fonts and always leads to be controlled in each written word.



Print Page | Close Window