 |
|
 |
With a simple iLogic rule, you can print a complete set of all sheets from your Inventor drawing, on a preset printer, by a single click of a button. It doesn't matter if you're printing to a physical printer, plotter, or PDF. In addition to the range of sheets, you can preset the scale, sheet format, number of copies, and other parameters.
Sub Main
'Print all sheets in your Inventor drawing document
If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then
Dim oDrwgDoc As DrawingDocument
oDrwgDoc = ThisApplication.ActiveDocument
Dim oDrwgPrintMgr As DrawingPrintManager
oDrwgPrintMgr = oDrwgDoc.PrintManager
' Set the printer name
' Printer name: comment this line to use the default printer or assign your own
oDrwgPrintMgr.Printer = "Microsoft Print to PDF" ' "HP LaserJet 4000 Series PCL 6"
'Set the paper size , scale and orientation
oDrwgPrintMgr.ScaleMode = kPrintBestFitScale ' kPrintFullScale
oDrwgPrintMgr.PaperSize = kPaperSizeA4
oDrwgPrintMgr.PrintRange = kPrintAllSheets ' ALL SHEETS, or kPrintCurrentSheet or kPrintSheetRange
'oDrwgPrintMgr.GetSheetRange(1,3) ' if Range
oDrwgPrintMgr.Orientation = kLandscapeOrientation
oDrwgPrintMgr.ColorMode = kPrintDefaultColorMode ' kPrintGrayScale
oDrwgPrintMgr.NumberOfCopies = 1
oDrwgPrintMgr.Rotate90Degrees = False
oDrwgPrintMgr.AllColorsAsBlack = False
oDrwgPrintMgr.RemoveLineWeights = False
oDrwgPrintMgr.TilingEnabled = False
oDrwgPrintMgr.SubmitPrint
Else
MsgBox("Not a drawing!")
End If
End Sub
You can assign a macro to a button in the ribbon for quick launching, e.g. using the functions of the bonus utility T4I.
|
|
Inventor
|

* CAD
|
4.11.2023
1645×
|
|
|