Ilogic Print Rule

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
i've just started out with Ilogic programing and i have run into my first hurdle
i'm trying to write a rule to print .idw's or .dwg's with the correct settings
i want the Drawing sheet size to be the paper size it prints in. but no matter wich printer i choose or what i change about the Rule it eihter gives an error or prints on the default paper size of the printer
this is what i have so far (no errors when i run it)
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 = "\\S-BE-JTEC-DATA\P-BE-JTEC-020"'oDrgPrintMgr.Printer = "Bullzip PDF Printer" oDrgPrintMgr.Printer = "\\S-BE-JTEC-DATA\P-BE-JTEC-006" 'Set the paper size , scale and orientation oDrgPrintMgr.Scalemode = kCustomScale oDrgPrintMgr.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale oDrgPrintMgr.PaperSize = kPaperSizeA3 'oDrgPrintMgr.PaperSize = kcustomsize'oDrgPrintMgr.PaperHeight = 16.54'oDrgPrintMgr.PaperWidth = 23.39 oDrgPrintMgr.PrintRange = kPrintCurrentSheet oDrgPrintMgr.Orientation = kLandscapeOrientation oDrgPrintMgr.ColorMode = kPrintColorPalette 'oDrgPrintMgr.ColorMode = kPrintGrayScale'oDrgPrintMgr.AllColorsAsBlack = True oDrgPrintMgr.SubmitPrint
one though i had was that the plotter uses the name "ISO A2" for an A2 page and that there is the problem but even the PDF printer gets the wrong format
Most of all i would like to have one button that prints the active sheet in the active sheets size with the correct orientation and the correct scale
Anyone have a good code to solve this enigma
thanks