I have written an application to open and print a dwg file. The plotting process is working correctly; however, when I looked at the Plot and Publish Details window, I saw that the File property is set to <UnSaved Drawing>
instead of my dwg file name.
I mean something like this :
Sheet :UnsavedDwg_2-Model - Plotted
File : <UnSaved Drawing>> Category name :> Page setup :> Device name : \\server\MyPrinterName> Plot file path :> Paper size : Letter
what is my mistake?!!!
Note : I have used the Open
method of DocumentCollection
class to open my dwg file and this code to plotting the opened dwg file to printer.
My code to open dwg file :
String MyDWGFilePath = @"\\Server\SharedFolder\Projects\File1.dwg";
DocumentCollection dm = Application.DocumentManager;
Document doc = null;
if(File.Exists(MyDWGFilePath))
{
doc = dm.Open(MyDWGFilePath, false);
Application.DocumentManager.MdiActiveDocument = doc;
}