Error while plotting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using a C# class by Gile from the following url to plot multiple layouts to a single PDF file
https://forums.autodesk.com/t5/net/plot-dwg-to-pdf-for-multiple-layouts-in-c/td-p/5849145
However I get the error at the time of calling the Publish() method. Some of the layouts and trying to plot are created programmatically in the current drawing. Before plotting the layouts, the drawing is saved and reopened as follows:
// Save the drawing
newDoc.CloseAndSave(reportDwgName); newDoc = Application.DocumentManager.Open(reportDwgName, false); Application.DocumentManager.MdiActiveDocument = newDoc; // Print the layouts to PDF List<Layout> layouts = GetAllLayouts(); ReportPrinter.MultiSheetsPdf pdf = new ReportPrinter.MultiSheetsPdf(analysisFolder, layouts); pdf.Publish();
If I explicitly save the drawing using the AutoCAD UI then I don't get this error.
The plot log shown by AutoCAD tell me that the two layouts that were programmatically created and added to the drawing were not found.
I have attached the capture of the error I am getting.
I will really appreciate any help on this issue. Thank you!
