- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have been trying to create a printing rule, I print half size (Scale 0.5) to hard copy printer and full size (Scale 1:1) to PDF.
At this stage I am still with the Hard copy printer and I am unable to set the custom scale.
I have used existing code found on the forum, and have been trying to adjust it to suit my requirements.
As you can see I have tried various options of changing the scale, but regardless it still prints to fit. (I commented out the scale to fit)
Hopefully it's just a syntax error?
Existing code:
Dim oDrawDoc As Document oDrawDoc = ThisApplication.ActiveDocument Dim oPrintMgr As PrintManager oPrintMgr = oDrawDoc.PrintManager 'specify your printer name oPrintMgr.Printer = "Canon iR2520 UFRII LT" oPrintMgr.ColorMode = kPrintDefaultColorMode oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA3 oPrintMgr.Scalemode = kCustomScale oPrintMgr.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale ''Testing for scale 'oPrintMgr.Scale = 0.5 '.Scale = 0.5 'oPrintMgr.ScaleMode = PrintScaleModeEnum.scale=0.5 oPrintMgr.SubmitPrint
Thanks guys.
Hopefully the PDF print is easier, as its a 1:1 print.
2025.2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
Solved, if it helps someone, hit the Kudos button.
Dim oDrawDoc As Document oDrawDoc = ThisApplication.ActiveDocument Dim oPrintMgr As PrintManager oPrintMgr = oDrawDoc.PrintManager 'specify your printer name oPrintMgr.Printer = "Canon iR2520 UFRII LT" oPrintMgr.ColorMode = kPrintDefaultColorMode oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA3 oPrintMgr.Scalemode = 13827 'Custom Scale oPrintMgr.ScaleMode = "0.5" oPrintMgr.SubmitPrint
The PDF was easy as well.
Dim oDrawDoc As Document oDrawDoc = ThisApplication.ActiveDocument Dim oPrintMgr As PrintManager oPrintMgr = oDrawDoc.PrintManager 'specify your printer name oPrintMgr.Printer = "PrimoPDF" oPrintMgr.ColorMode = kPrintDefaultColorMode oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA1 oPrintMgr.Scalemode = 13825 'Full Scale print @1:1 oPrintMgr.SubmitPrint
2025.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
It appears I was a little ahead of myself there, After restarting inventor, the Printer scale went back to "1"
It still changed to custom scale, but just set the scale value to "1" and not "0.5"
So I guess it s still not working?
2025.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Seriously......
A simple sytax error:
oPrintMgr.Scale = 0.5
All fixed now.
Dim oDrawDoc As Document oDrawDoc = ThisApplication.ActiveDocument Dim oPrintMgr As PrintManager oPrintMgr = oDrawDoc.PrintManager 'specify your printer name oPrintMgr.Printer = "Canon iR2520 UFRII LT" oPrintMgr.ColorMode = kPrintDefaultColorMode oPrintMgr.Orientation = kLandscapeOrientation oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA3 oPrintMgr.Scalemode = 13827 oPrintMgr.Scale = 0.5 oPrintMgr.SubmitPrint
2025.2