Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

iLogic Printing - another one.

rhasell
Advisor

iLogic Printing - another one.

rhasell
Advisor
Advisor

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

printer scale.JPG

 

Thanks guys.

Hopefully the PDF print is easier, as its a 1:1 print.

 

Reg
2025.2
0 Likes
Reply
Accepted solutions (1)
868 Views
3 Replies
Replies (3)

rhasell
Advisor
Advisor

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
Reg
2025.2

rhasell
Advisor
Advisor

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?

 

Reg
2025.2
0 Likes

rhasell
Advisor
Advisor
Accepted solution

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

 

Reg
2025.2