Hi Andrew
Thinking more about this problem I would prefer that when specifying a comma separated list of blocks for the command line then that explicit ordering would be used when printing.
This would support having multiple 'printing sets'. E.g from the same drawing (dxf file) I sometimes need to print two different pdf's:
3Layout,1Layout,2Layout (in this order)
and
1Layout,Layout2,Layout3,Layout4 (in this order)
To achieve this I would create two .bat scripts with these explicit definitions.
I hope this is achievable in some way while still supporting regular expressions. Or by a new parameter for the command line (e.g 'layout-order').
[solved] How to print multiple Layout blocks to one PDF file
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: How to print multiple Layout blocks to one PDF file
I've settled for:
Code: Select all
-block=BLOCK_NAMES Comma-separated list of block(s) or
layout(s) to export
List may include regular expressions
List defines order of export unless
-block-sort is used
A block may be exported more than once
unless -block-unique is used
-block-sort Sort blocks in natural order
Layouts are sorted by tab order
and exported before blocks
Blocks are ordered alphanumerically
-block-unique Export every matching block only once
Re: How to print multiple Layout blocks to one PDF file
Splendid! Thank you for the quick response.
Let me know when you want me to test it out.
Let me know when you want me to test it out.
Re: How to print multiple Layout blocks to one PDF file
The latest dwg2pdf included in QCAD Snapshot 3.23.0.6 contains these switches if you wish to test them.
Re: How to print multiple Layout blocks to one PDF file
Andrew,
It works perfectly. I'm now able to print different pdf's from the same dxf file, with blocks in the order I want. Christmas came early this year.
Thank you for implementing this.
Cheers,
Mads
It works perfectly. I'm now able to print different pdf's from the same dxf file, with blocks in the order I want. Christmas came early this year.
Thank you for implementing this.
Cheers,
Mads
Re: [solved] How to print multiple Layout blocks to one PDF file
The dwg2pds supports printing multiple layout blocks into one PDF file on Mac as well:
It took me a bit to realize how to create multiple layouts or multiple paper spaces with the Block/Add Layout Block(BL) with the documentation at https://qcad.org/en/tutorial-working-wi ... -viewports -- The tutorial does show images listing multiple layouts, and it does mention the creating layouts, but it doesn't demonstrate the process.
Code: Select all
drf$ /Applications/QCAD-Pro.app/Contents/Resources/dwg2pdf -a -f -block="Layout1,Layout2" -m 5 -landscape -p "A4" 2020/qcad_test1.dxf
QCAD version 3.25.2
Warning: RPropertyTypeId::generateId: property already initialized: 7RObject : "" : "Invisible"
12:24:25: Debug: calling odInitialize
12:24:25: Debug: dropped global XDATA (no res buf): "ViewportCenter"
Converting
from: /Users/drf/2020/qcad_test1.dxf
to : /Users/drf/2020/qcad_test1.pdf
12:24:26: Debug: exporting layout: Layout1 (*Paper_Space0) [0]
12:24:26: Debug: exporting layout: Layout2 (*Paper_Space) [2]
drf$ open 2020/qcad_test1.pdf