Hi!
I'm trying to automatically plot generated documents in ACAD Map using .NET.
I plot to DWF and PDF files.
Plotting works just fine, but now I have two problems.
First: I want to select a certain media format. I need to print to ISO A3.
I try to set this format using:
PlotSettings settings = new PlotSettings(true);
PlotSettingsValidator settingsValidator = PlotSettingsValidator.Current;
settingsValidator.SetClosestMediaName(settings, 420.0, 297.0, PlotPaperUnit.Millimeters, false);
SetClosestMediaName throws an Exception that complains about "eInvalidInput".
I tried to get a list of supported media names using
StringCollection media = settingsValidator.GetCanonicalMediaNameList(settings);
To my surprise I discovered that the resulting list doesn't contain ISO A3.
It contains A4 and A5 though.
When I open the plot-dialog manually I get a much longer list of supported media types - where do they come from?
How can I select those?
Best solution: How can I set the format to fit on 420x297 mm? I don't care about the name the required format has to ACAD 😉
Now to my second problem:
Rotating the page.
When I plot the drawing, the resulting DWF and PDF files differ.
The DWF is plotted on a landscape "paper", although the drawing would be portrait.
Although the plotsettings have set to fit the drawing on the paper, the top and bottom borders of my drawing are missing on the landscape DWF.
When I plot to PDF things get even worse.
The pdf is in portrait, the drawing is rotated by 90 degrees, so it doesn't fit on paper either.
Can anyone help me with this?
I've tried to setthe rotation using
settingsValidator.SetPlotRotation(settings, PlotRotation.Degrees000); and other rotation-values, but it didn't work as expected.
I need this to be done quickly and I don't know what I can do about it anymore.
Any help is really appreciated.
Best Regards
Christian Nitschkowski