dwg ファイルを開いて印刷するアプリケーションを作成しました。プロット プロセスは正しく機能しています。しかし、印刷とパブリッシュの詳細ウィンドウを見ると、ファイル プロパティが<UnSaved Drawing>
自分の dwg ファイル名ではなく に設定されていることがわかりました。
私はこのようなことを意味します:
シート :UnsavedDwg_2-Model - プロット済み
File : <UnSaved Drawing>> Category name :> Page setup :> Device name : \\server\MyPrinterName> Plot file path :> Paper size : Letter
私の間違いは何ですか?
注:クラスのOpen
メソッドを使用してdwgファイルを開き、このコードを使用して開いたdwgファイルをプリンターに印刷しました。DocumentCollection
dwgファイルを開くための私のコード:
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;
}