Publish to separate PDFs (using routine)

Publish to separate PDFs (using routine)

Millwood-k
Advocate Advocate
923 Views
14 Replies
Message 1 of 15

Publish to separate PDFs (using routine)

Millwood-k
Advocate
Advocate

Hello there,

 

I have this simple nice routine to customize (Export to separate DWG with customize extension),

Can anyone adapt it to (Publish to separate PDF with customize extension)

 

 

*here is the script:

(defun c:ltodwg ( / base old_dia)

(if (null LM:browseforfolder)
(load "BrowseForFolderV1-3")
)
(if (setq base (LM:browseforfolder "Select a folder" " C:\\" 1))
(progn
(setq old_dia (getvar 'FILEDIA))
(setvar 'FILEDIA 0)

(setq base (strcat base "\\" (vl-filename-base (getvar 'DWGNAME))))
(foreach lay (layoutlist)

(command "_.ctab" lay "exportlayout" (strcat base "-" lay "_CAD_2021"))
)
(setvar 'FILEDIA old_dia)
); progn
); if
(princ)

 

apreciation.

 

0 Likes
924 Views
14 Replies
Replies (14)
Message 2 of 15

cgooding
Enthusiast
Enthusiast

If I understand correctly, you want to publish to separate PDF files instead of a single multipage file.

I just use the publish command, and change the settings to uncheck "Multi-sheet file".

This creates separate PDF files with naming convention "Dwg Name-Tab Name.pdf"

Hope this helps.

0 Likes
Message 3 of 15

Millwood-k
Advocate
Advocate

thanks for the answer,

 

Yes, but the way showed doesn't allow you to add extension (to each separate pdf), and doesn't allow you to use only Layout name, which this routine if adapted can do.

0 Likes
Message 4 of 15

cgooding
Enthusiast
Enthusiast

Sorry, I'm just curious: What is the purpose of adding extension?

 

0 Likes
Message 5 of 15

maratovich
Advisor
Advisor

@Millwood-k  написал (-а):

Yes, but the way showed doesn't allow you to add extension (to each separate pdf), and doesn't allow you to use only Layout name, which this routine if adapted can do.


Then you have to use Lisp for printing or program.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 6 of 15

cgooding
Enthusiast
Enthusiast

Now I wonder if I should just delete my original response since it didn't answer your question! 😐

 

0 Likes
Message 7 of 15

Millwood-k
Advocate
Advocate

I do have 100s layout in each dwg file, and need to publish them as fellow

XLayout name+CAD_2021, (X variable from file to file), and the file name doesn't have to be shown.

0 Likes
Message 8 of 15

maratovich
Advisor
Advisor

@Millwood-k  написал (-а):

XLayout name+CAD_2021, (X variable from file to file), and the file name doesn't have to be shown.


name.png

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 9 of 15

Millwood-k
Advocate
Advocate

Your solution works for other needed cases, 

 

Thanks 

0 Likes
Message 10 of 15

Millwood-k
Advocate
Advocate

I haven't seen this, is it a third part app ?

 

0 Likes
Message 11 of 15

Millwood-k
Advocate
Advocate

Actually I do have LayoutManager app, but for some reason I am looking for a simple routine.

Thanks

0 Likes
Message 12 of 15

maratovich
Advisor
Advisor

@Millwood-k  написал (-а):

I haven't seen this, is it a third part app ?

 


Here it is - Revers 

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 13 of 15

john.uhden
Mentor
Mentor

No offense, but can't you just use sheet set manager?

There are PDF publish options where you can toggle off Multi-sheet PDF.

You get a separate PDF for each sheet.

My boss prefers that because he never remembers to scroll down or page down, and then asks where the rest of the sheets are.

John F. Uhden

Message 14 of 15

pendean
Community Legend
Community Legend
All you need is a batch processor: run your lisp in 100s of DWG files since that's all you really want to do (aka simple). There are dozens of recommendations in this forum and on the web, some are free many of the good ones are not. Help yourself.

Here is one https://www.kdmsoft.net/autorunlisp.html
and another https://apps.autodesk.com/ACD/en/Detail/Index?id=4355599973554868100&appLang=en&os=Win32_64
and more https://www.google.com/search?q=run+lisp+in+multiple+drawings

HTH
Message 15 of 15

Sea-Haven
Mentor
Mentor

The Maratovich proposal is the way to go, I do have a plot layouts by range so can plot 1-100 etc or 34-37 and so on all will be seperate, its lisp so could add the extra pdf name stuff. I use ghostscript to join them back into 1 pdf as a option also part of the lisp.

 

screenshot389.png