I just downloaded your CADImport.net library yesterday and I've been trying to us it to print DWG files in the background. We are doing this so we can stream line our processes internally and have our paperwork printed pre-grouped.
My first attempt at doing this was using the following code:
Code: Select all
CADImport.CADImage dwg = new CADImport.CADImage();
dwg.LoadFromFile("c:\\test.dwg");
this.dwg.Print(true, true, "HP Laserjet 1022n");
Second attempt using the viewer which contains a CADImage object within it
Keep in mind that for this code the viewer was dropped on a form
Code: Select all
this.cadViewerControl1.LoadFile("c:\\test.dwg");
this.cadViewerControl1.Image.Print(false, true, "HP Laserjet 1022n");
If I run LoadFile wait 3 seconds and then run Print... it all works. Obviously something to do with it completing loading.
By the way, how do you reference XRef paths?
If we can get this to work (silent DWG printing), we will purchase a license for sure.