- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi!
The goal:
is to print only the A4 size sheets in a multisheet drawing (Portrait and landscape).
Im using the code below to select only the A4 size sheets and print them.
Problem:
When i print, it select well the number, size and orientation for the A4 sheets in the document, but only print the content (views, border, Titleblock) of the active sheet.
i.e
If i have 4 sheets in the drawing,
Sheet 1 is not A4 and is active
Sheet 2 is A4 Portrait
Sheet3 is A4 Landscape
Sheet4 is not A4
then, it will print two paper sheets(correct): one size A4 and Portrait (from sheet2 specifications), other size A4 Landscape (from sheet 3 specifications), but both have the content of the sheet1 (active sheet)
Any help to correct this?
Thanks.
SyntaxEditor Code Snippet
'Define the drawing Dim oDrawing As DrawingDocument oDrawing = ThisApplication.ActiveDocument Dim oSheet As Sheet For Each oSheet In oDrawing.Sheets If oSheet.Size = kA4DrawingSheetSize And oSheet.Orientation = kPortraitPageOrientation Then oPrintMgr = ThisApplication.ActiveDocument.PrintManager 'oPrintMgr.ColorMode = kPrintGrayScale oPrintMgr.ColorMode = kPrintColorPalette oPrintMgr.NumberOfCopies = 1 oPrintMgr.ScaleMode = kPrintFullScale oPrintMgr.Orientation = kPortraitOrientation 'oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = kPaperSizeA4 oPrintMgr.PaperHeight = 210 mm oPrintMgr.PaperWidth = 297 mm oPrintMgr.SubmitPrint End If If oSheet.Size = kA4DrawingSheetSize And oSheet.Orientation = kLandscapePageOrientation Then oPrintMgr = ThisApplication.ActiveDocument.PrintManager 'oPrintMgr.ColorMode = kPrintGrayScale oPrintMgr.ColorMode = kPrintColorPalette oPrintMgr.NumberOfCopies = 1 oPrintMgr.ScaleMode = kPrintFullScale 'oPrintMgr.Orientation = kPortraitOrientation oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = kPaperSizeA4 oPrintMgr.PaperHeight = 297 mm oPrintMgr.PaperWidth = 210 mm oPrintMgr.SubmitPrint End If Next
Solved! Go to Solution.