Steven P Posted February 3, 2021 Posted February 3, 2021 Good afternoon. I am expecting this to be a 'sorry, not possible' answer however here goes... Todays back ground to the question is I have been sent a 'CAD FIle' which is CAD->PDF->CAD->Exploded PDF, so it looks good to the project managers eyes.. but.... For example all the letters are broken down to their component lines and curves (I know if you convert a PDF now it can convert text to text... but they don't obviously). Is there any way that I can identify a shape made from a few objects and for AutoCAD to locate all similar shapes within the drawing? I think I can then delete the original object and replace it in this case with the letter. Once I have letters I have a text join function to create words afterwards. (with a similar idea I had one yesterday, which had had a conversion where all 300 or so electrical terminals - all the same symbol - were individual blocks - would be great to use a similar idea, locate similar shapes and replace them to be a single block) So expecting this to be a 'sorry cannot be done' but you never know Thanks for looking Quote
Dahzee Posted February 3, 2021 Posted February 3, 2021 Steven, I don't know if you have access to The Swamp, but Marko Ribar created a routine which might work for you. It is similar to the Blockify command in Bricscad, where you can make blocks from similarly arranged entities (in your case lines which form letters), I can't test it as I am already using Bricscad so have no need for it but it may help you select the "letters". http://www.theswamp.org/index.php?topic=55186.0 1 Quote
steven-g Posted February 3, 2021 Posted February 3, 2021 I can't speak for the Lisp Guru's here but it sounds like what you want, is this feature in Bricsys called blockify. Quote
Steven P Posted February 3, 2021 Author Posted February 3, 2021 I can see how Blockify works - just been trying it thanks. Couple of small things I note was that there is no similarity, it is either exactly the same or nothing on my short test (so a letter A and A x 1.05 height are not the same) which is a shame. It might work for my other example of the multiple blocks, I'll try it next time I need to. Blockify is a VLX so I can't see the LISP code, can't change it to suit either. In the case of letters it makes up an indivdual letter, as a block I would still need to replace the lines in a block with the letter, then go through the drawing and explode the block which might only be a bit quicker then just copying a each letter in turn, past on top of the text and delete the line version. I'll look again tomorrow properly, close but not quite unfortunately Quote
Stefan BMR Posted February 3, 2021 Posted February 3, 2021 Hi Post a sample, maybe I can help you. I had this dwg file from pdf with a lot of errors. Some of the text were imported correct, but some were imported as hatch. Worst, some words were imported both ways, with a hatch in the middle. Quote
BIGAL Posted February 3, 2021 Posted February 3, 2021 Raster to Vector has been around for years, now we have PDF to dwg, both promise miracles. Your pdf sounds like its all raster or short vectors. "Using PDFIMPORT with PDFs created from scanned images/documents will result in the creation of a raster image file, which is then attached to the drawing as an xref. The raster imagery will not be converted into editable geometry." It may be worth looking at raster to vector also perhaps a combination of the 2. Tried a import ttf came in other text what a mess. Bit like the raster draw manually only what is required erase all the rest. Quote
Dahzee Posted February 4, 2021 Posted February 4, 2021 Steven, If Stefan BMR's routine doesn't do what need, then you need to look for OCR software (Optical Character Recognition), this ability can be found in PDF and Raster to Vector programs. There are a few out there that might do what you need and if it is only one drawing that needs converting just try the demos as some of them are quite expensive. 1 Quote
Steven P Posted February 5, 2021 Author Posted February 5, 2021 (edited) Good morning, Here is an area from the drawing I was talking about this week, wonder if this will work Stefan PDF to Text Example.dwg Edited February 5, 2021 by Steven P Quote
BIGAL Posted February 6, 2021 Posted February 6, 2021 Maybe if you have Acrobat How to use OCR software for PDFs in 4 easy steps | Adobe Acrobat DC Quote
Stefan BMR Posted February 6, 2021 Posted February 6, 2021 21 hours ago, Steven P said: Good morning, Here is an area from the drawing I was talking about this week, wonder if this will work Stefan Hi My method works with ttf only, based on the area and the perimeter of the outer boundary. Unfortunately, this doesn't work in your situation. I think it is possible, with my lisp and some extra steps, or some other methods, but now I don't have the time. Sorry. 1 Quote
Steven P Posted February 6, 2021 Author Posted February 6, 2021 9 hours ago, BIGAL said: Maybe if you have Acrobat How to use OCR software for PDFs in 4 easy steps | Adobe Acrobat DC I'd agree, use PDF / CAD to convert it using the tools, but I was only sent a converted CAD file in this case. I'll see what happens if I make a PDF and convert it again but suspect I'll get the same again. No problem Stefan, thanks for looking 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.