Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch Plot to pdf in model space

76 REPLIES 76
SOLVED
Reply
Message 1 of 77
Anonymous
16917 Views, 76 Replies

Batch Plot to pdf in model space

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).
76 REPLIES 76
Message 61 of 77
reegancath
in reply to: paullimapa

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 .

Message 62 of 77
paullimapa
in reply to: reegancath

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
Message 63 of 77
paullimapa
in reply to: reegancath

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
Message 64 of 77
reegancath
in reply to: paullimapa

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" .

Message 65 of 77
paullimapa
in reply to: reegancath

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
Message 66 of 77
reegancath
in reply to: paullimapa

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 🤐

 

 

Message 67 of 77
paullimapa
in reply to: reegancath

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
Message 68 of 77
maratovich
in reply to: Anonymous

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
Message 69 of 77
Sea-Haven
in reply to: Anonymous

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.

Message 70 of 77
paullimapa
in reply to: Sea-Haven

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
Message 71 of 77
dhakalvivek
in reply to: paullimapa

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.

Message 72 of 77
paullimapa
in reply to: dhakalvivek

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
in reply to: paullimapa

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.

Message 74 of 77
paullimapa
in reply to: dhakalvivek

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
Message 75 of 77
maratovich
in reply to: dhakalvivek


@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
Message 76 of 77
dhakalvivek
in reply to: paullimapa

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.

Message 77 of 77
paullimapa
in reply to: dhakalvivek

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta