Can anybody help me with some advice about how to find out using the .NET API if a plot device requires a file name when ploting?
E.g. choosing the plot to PDF device would require a file name.
Thanks,
Peter
PlotConfig tds = PlotConfigManager.CurrentConfig;
string plotFile = null;
if (tds.PlotToFileCapability == PlotToFileCapability.PlotToFileAllowed)
{
tds.IsPlotToFile = true;
plotFile = Path.Combine(Path.GetDirectoryName(Application.DocumentManager.MdiActiveDocument.Database.Filename), Path.GetFileNameWithoutExtension(Application.DocumentManager.MdiActiveDocument.Database.Filename));
plotFile = plotFile + tds.DefaultFileExtension;
if (File.Exists(plotFile))
File.Delete(plotFile);
}
if (tds.IsPlotToFile)
plotEngine.BeginDocument(plotInfo, Application.DocumentManager.MdiActiveDocument.Database.Filename, null, 1, true, plotFile);
else
plotEngine.BeginDocument(plotInfo, Application.DocumentManager.MdiActiveDocument.Database.Filename, null, 1, false, null);