Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Another ilogic Print Problem

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
384 Views, 2 Replies

Another ilogic Print Problem

Hi everyone.

 

I have copied a macro (that works perfectly) into an ilogic rule. The problem is that the ilogic rule ignores the paper size and scaling lines.

 

Any ideas?

 

SyntaxEditor Code Snippet

Dim oDrgDoc As DrawingDocument
oDrgDoc = ThisApplication.ActiveDocument

' Set reference to drawing print manager' DrawingPrintManager has more options than PrintManager' as it's specific to drawing document
Dim oDrgPrintMgr As DrawingPrintManager
oDrgPrintMgr = oDrgDoc.PrintManager
' Set the printer name' comment this line to use default printer or assign another one
oDrgPrintMgr.Printer = "\\printserv\HP LaserJet 5000 Series Win7 PS"

'Set the paper size , scale and orientation
oDrgPrintMgr.ScaleMode = kPrintBestFitScale
oDrgPrintMgr.PaperSize = kPaperSizeA3
oDrgPrintMgr.PrintRange = kPrintCurrentSheet
oDrgPrintMgr.Orientation = kLandscapeOrientation
'oDrgPrintMgr.ColorMode = kPrintColorPalette'oDrgPrintMgr.ColorMode = kPrintGrayScale
oDrgPrintMgr.AllColorsAsBlack = True
oDrgPrintMgr.SubmitPrint
2 REPLIES 2
Message 2 of 3
VdVeek
in reply to: Anonymous

I posted something about iLogic Printing a while back here: http://forums.autodesk.com/t5/inventor-customization/print-with-ilogic/td-p/3688786/page/2

Use the PrintSizeEnum for your PaperSize. Maybe the Line scaling is something the same.

Rob.

oPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeA3
Autodesk Inventor 2015 Certified Professional & Autodesk Inventor 2012 Certified Professional.
Message 3 of 3
Anonymous
in reply to: VdVeek

Thanks Rob that works perfectly for the paper size.

 

I used this for the scaling:

oPrintMgr.Scalemode = kCustomScale
oPrintMgr.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report