Lisp for PDF Import, Save As

Lisp for PDF Import, Save As

ryan_carey
Contributor Contributor
2,561 Views
1 Reply
Message 1 of 2

Lisp for PDF Import, Save As

ryan_carey
Contributor
Contributor

Can someone please help me out with a LISP file or write a script for this to happen?  I have tried everything I know.

 

With AutoCAD open, I would like to do this

File

New

(When the select Template box opens, I have to change my “look in” location. I would love to *in the lisp file* paste the location of .dwt file in where I want it to get it from)

The template opens in layout so I want to switch to model tab

Insert

PDF import

Go to the folder of the PDF’s (here there is a list of 100 PDFs and they are not rasterized.  I have tested them and they import as entities, editable lines,etc)

I would like for it to take all the PDF’s in that folder and convert them to DWG and save as an individual file for each.  If needed, I can combine all PDF’s into one file and save it as its own pdf document.

 

If that’s not feasible, do you know of a way of taking a set of PDF’s that are able to import to a dwg file and saveas dwg? 

I have tried some of the software’s online and they seem to not convert as well as doing the PDF import function. 

 

I have thousands of PDF’s that I need to import into DWG and save as their individual files.

2,562 Views
1 Reply
Reply (1)
Message 2 of 2

ryan_carey
Contributor
Contributor

If that doesnt make sense, how about to simplify it.. Can someone please help me with a LISP to do this:

With a drawing open in model space, i would like to

 

-right click on layout 1

-click "from Template"

-here i would like to insert my template location  (ex: Y:\AutoCAD Support\Blocks & Templates\New Drawing Templates\D size.dwt)

-Open

-"OK" when it prompts me for Layout 1

-delete layout1 and layout2 (so my titleblock will be the only layout tab)

-zoom extents inside the titleblocks viewport

-click out of viewport

-zoom extents

-save

-close

 

Repeat with the next file in that folder

 

 

0 Likes