Batch Plot to pdf in model space

Batch Plot to pdf in model space

Anonymous
Not applicable
26,150 Views
76 Replies
Message 1 of 77

Batch Plot to pdf in model space

Anonymous
Not applicable

Please help me, 

I want to know is there any lisp for printing multiple blocks to pdf at once?
I have hundreds of drawing and each drawing have many title blocks in model/Layout in different size (all title blocks are in blocks named A1). So if i use publish command, i have to open all 100 drawings and make page setup for all title blocks. It is waste of time. So i am looking for a program which print a specific  blocks one by one (instead of selecting a window/layout/extends) in model or layout converting to pdf at once. Hope you understand the matter. Help would be appreciated (I am really sorry for my poor English).
0 Likes
Accepted solutions (2)
26,151 Views
76 Replies
Replies (76)
Message 61 of 77

reegancath
Contributor
Contributor

It works for the blocks , but the attributes/texts inside the blocks remain unchanged (please see attached documents). If this can be solved then kudos .

Can't stop Thanking you for the time and effort you put in .

0 Likes
Message 62 of 77

paullimapa
Mentor
Mentor

Questions:

1) there is only the one Text object inside each Title Block that needs to be aligned?

2) is the drawing you want Text objects to also align exactly as what you are showing?

3) if answers are yes to both questions above, have you tried searching online for “autolisp align Text”?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 63 of 77

paullimapa
Mentor
Mentor

You may also want to try the built in AutoCAD Textalign command:

https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Au...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 64 of 77

reegancath
Contributor
Contributor

Please see attached documents . 

The texts , line , blocks inside the title blocks are not aligned when using blkalign , is it possible to modify the code so that everything gets aligned ?

 

TBH I am very much happy and Thankful for the lisp code provided in "Message 48" .

0 Likes
Message 65 of 77

paullimapa
Mentor
Mentor

Since Blkalign works on Blocks only, it does not work on objects not included in the block. I’m shocked on how much the title blocks need to be moved in order to line up. Whoever dew these that way did a terrible job. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 66 of 77

reegancath
Contributor
Contributor

Noted.

 

😬 err.... The title blocks aren't aligned like this in the actual dwgs .

 

This was just a test dwg, I tried to place the title blocks at different position to check if the "blk lisp " aligns title blocks and the objects inside it 🤐

 

 

0 Likes
Message 67 of 77

paullimapa
Mentor
Mentor

Good. Because if the title blocks are actually that far off from being aligned then you’re stuck with the demo code that only aligns in the x direction which means back to selecting one row at a time to generate PDFs 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 68 of 77

maratovich
Advisor
Advisor

I'm following the topic, and I wonder how much more time the author will spend. And how long will it last for people trying to help him ..
And the author could have printed everything automatically for a long time ...

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

Sea-Haven
Mentor
Mentor

For us we would use 1 title block size so not have a mix of sizes and scales, also would do as layouts makes life so much easier as title block is full size and the mview adjusted to correct scale for the selected objects area. One of the title blocks is shrunk a bit so much easier to do same in a layout.

 

Having a go at using layouts will reap big benefits.

 

For me just pick a menu option and all sheets printed pdf or hard copy, look at Maratovich plot software very advanced.

0 Likes
Message 70 of 77

paullimapa
Mentor
Mentor

Absolutely agree with you @Sea-Haven .  Placing various size title blocks in model and layout is just not the proper way of using CAD efficiently (look back at my original reply way back in 2016). @hmsilva did a great job initially coming up with the demo lisp code to at least make it possible to automate all these title blocks plotted to PDF. But everything is plotted to FIT which I would not prefer to use for construction documentation. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 71 of 77

dhakalvivek
Observer
Observer

sine this code needs the title blocks to be positioned perfectly in Y direction ( which is quite time consuming to arrange them perfectly in Y). Can this be changed to take inputs of each rows individually from user, then sort each rows separately in X direction only,  combine them into a single list and print it ?

 

If anyone knows how to edit the code, please help.

0 Likes
Message 72 of 77

paullimapa
Mentor
Mentor

I think it's best to run the align block code on the selected objects in this case only on the title blocks you want to align horizontally on each row separately. It would not know that the blocks you've selected on a different row would need to be aligned separately. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 73 of 77

dhakalvivek
Observer
Observer

i have multiple viewports inside my title block boundary in layout tab and i think block align can only move the title block boundaries (not everything inside it). so block align may not work in my case.

0 Likes
Message 74 of 77

paullimapa
Mentor
Mentor

If your title blocks are off by so much that requires all objects (not part of the title block) within it to be moved as well, then the blkalign code will obviously not work for you. Do you have multiple title blocks placed inside a single Layout that requires batch printing and are misaligned that badly?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 75 of 77

maratovich
Advisor
Advisor

@dhakalvivek  написал (-а):

sine this code needs the title blocks to be positioned perfectly in Y direction ( which is quite time consuming to arrange them perfectly in Y). Can this be changed to take inputs of each rows individually from user, then sort each rows separately in X direction only,  combine them into a single list and print it ?

 

If anyone knows how to edit the code, please help.


Use a ready-made solution for automatic printing  -Revers 

 

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

dhakalvivek
Observer
Observer

1. yes, i have multiple title blocks inside single layout tab

2. Most of the title blocks are arranged in two to three rows. ( ascending left to right, top to bottom, but not perfectly). i mean each rows of title block are not perfectly resting in a horizontal line. 

3. Ecah title block (A3) are full of multiple viewports showing small details and covers the entire sheet. so if only the title block boundary is moved slightly, it may interfere with viewports and viewport boundary may fall outside the title block boundary. 

4. i am still using your code arranging each row of my title blocks perfectly but it's quite time consuming when you have a lot to print.

0 Likes
Message 77 of 77

paullimapa
Mentor
Mentor

To help with the move a bit faster, you could temporarily turn off all vports (MVIEW Off All).

Then when you're done turn all of them back on (MVIEW On All).


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes