|
|
|
Pomocí jednoduchého iLogic pravidla můžete z výkresu Inventoru tisknout kompletní sadu všech listů, na předvolené tiskárně, stiskem jediného tlačítka. Nezáleží přitom, zda tisknete na fyzickou tiskárnu, plotter nebo do PDF. Kromě rozsahu listů můžete přednastavit i měřítko, formát listu, kopie a další parametry.
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
Makro si můžete pro rychlé spuštění přiřadit na tlačítko v ribbonu např. pomocí funkcí bonus nadstavby T4I.
|
|
|