Message 1 of 2
Plotting multiple sheets (layouts) with C#
Not applicable
07-30-2009
04:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I was hoping someone could help me out with a bug in my little macro. I created a little custom plot dialog that allows the user to select any or all layouts in a drawing, specify the number of copies, a color table, whether or not to collate them and what size paper to print them on. I had this same macro in VBA and it worked fine but since we upgraded to 2010 I decided to re-write it in C#.
Anyway, it all works great except one little hiccup. If I print a single layout tab, and I'm watching the selected printers queue, I see the print job spool up in the queue and it shoots through to the printer just fine. If I print 2 or more layouts and watch the print queue of the selected printer all the print jobs show up in the queue but the status of each print job just hangs at "Spooling". They just sit there forever until I exit AutoCAD then WHAM, they all print. I'm calling the exact same code, I'm just looping through it passing a different layout each time if there are multiple layouts selected to print.
Now I've tested this on multiple computers with multiple OS's and multiple printers all with the same result, when printing multiple layouts they hang at 'Spooling' until I exit out of AutoCAD. I'm sure it's some silly novice mistake that I'm making but I've been staring at the code so long I can't see it. I'd be happy to post the code if anyone is willing to take a look at it but I'm afraid that it's too long to post inline in the forum. Is there a recommended attachment type? I'm using VS 2008 and can post a zip of the project but maybe that's more trouble than it's worth?
Thanks in advance.
Anyway, it all works great except one little hiccup. If I print a single layout tab, and I'm watching the selected printers queue, I see the print job spool up in the queue and it shoots through to the printer just fine. If I print 2 or more layouts and watch the print queue of the selected printer all the print jobs show up in the queue but the status of each print job just hangs at "Spooling". They just sit there forever until I exit AutoCAD then WHAM, they all print. I'm calling the exact same code, I'm just looping through it passing a different layout each time if there are multiple layouts selected to print.
Now I've tested this on multiple computers with multiple OS's and multiple printers all with the same result, when printing multiple layouts they hang at 'Spooling' until I exit out of AutoCAD. I'm sure it's some silly novice mistake that I'm making but I've been staring at the code so long I can't see it. I'd be happy to post the code if anyone is willing to take a look at it but I'm afraid that it's too long to post inline in the forum. Is there a recommended attachment type? I'm using VS 2008 and can post a zip of the project but maybe that's more trouble than it's worth?
Thanks in advance.