<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PlotInfo error in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/plotinfo-error/m-p/2682071#M65457</link>
    <description>Hello everybody&lt;BR /&gt;
&lt;BR /&gt;
I am having problem in generating PlotInfo with following code. What I am trying to do is create Layout and apply generated plot-info using layout.CopyForm(GetPlotInfo()).&lt;BR /&gt;
&lt;BR /&gt;
public static PlotInfo GetPlotInfo()&lt;BR /&gt;
        {&lt;BR /&gt;
            string LAYOUT_NAME = "Layout1";&lt;BR /&gt;
            string PRINTER = "DWF6 ePlot.pc3";&lt;BR /&gt;
            string PAPERSIZE = "ISO_A1_(841.00_x_594.00_MM)";&lt;BR /&gt;
            StdScaleType SCALE = StdScaleType.ScaleToFit;&lt;BR /&gt;
            PlotRotation ROTATION = PlotRotation.Degrees000;&lt;BR /&gt;
            ClsMethods.SetLayout(LAYOUT_NAME);&lt;BR /&gt;
&lt;BR /&gt;
            PlotInfo plotInfo = new PlotInfo();&lt;BR /&gt;
            PlotInfoValidator piValidator = new PlotInfoValidator();&lt;BR /&gt;
            PlotSettings plotSet = new PlotSettings(false);&lt;BR /&gt;
            try&lt;BR /&gt;
            {&lt;BR /&gt;
&lt;BR /&gt;
                PlotSettingsValidator psValidator = PlotSettingsValidator.Current;&lt;BR /&gt;
                psValidator.RefreshLists(plotSet);&lt;BR /&gt;
&lt;BR /&gt;
                plotInfo.Layout = LayoutManager.Current.GetLayoutId(LAYOUT_NAME);&lt;BR /&gt;
                psValidator.SetPlotPaperUnits(plotSet, PlotPaperUnit.Millimeters);&lt;BR /&gt;
                psValidator.SetPlotRotation(plotSet, ROTATION);&lt;BR /&gt;
                psValidator.SetPlotType(plotSet, Autodesk.AutoCAD.DatabaseServices.PlotType.Extents);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator.SetUseStandardScale(plotSet, true);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator.SetStdScaleType(plotSet, SCALE);&lt;BR /&gt;
                psValidator.SetPlotCentered(plotSet, false);&lt;BR /&gt;
                psValidator.SetPlotOrigin(plotSet, new Point2d(0.0, 0.75));&lt;BR /&gt;
                psValidator.SetPlotConfigurationName(plotSet, PRINTER, PAPERSIZE);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator = null;&lt;BR /&gt;
                plotSet.ShadePlot = PlotSettingsShadePlotType.AsDisplayed;&lt;BR /&gt;
                plotSet.PrintLineweights = true;&lt;BR /&gt;
                plotSet.ScaleLineweights = false;&lt;BR /&gt;
                plotInfo.OverrideSettings = plotSet;&lt;BR /&gt;
                piValidator.Validate(plotInfo);&lt;BR /&gt;
            }&lt;BR /&gt;
            catch (Autodesk.AutoCAD.Runtime.Exception ex)&lt;BR /&gt;
            {&lt;BR /&gt;
                MessageBox.Show(ex.Message);&lt;BR /&gt;
            }&lt;BR /&gt;
&lt;BR /&gt;
            return plotInfo;&lt;BR /&gt;
        }</description>
    <pubDate>Wed, 12 May 2010 18:53:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-05-12T18:53:10Z</dc:date>
    <item>
      <title>PlotInfo error</title>
      <link>https://forums.autodesk.com/t5/net-forum/plotinfo-error/m-p/2682071#M65457</link>
      <description>Hello everybody&lt;BR /&gt;
&lt;BR /&gt;
I am having problem in generating PlotInfo with following code. What I am trying to do is create Layout and apply generated plot-info using layout.CopyForm(GetPlotInfo()).&lt;BR /&gt;
&lt;BR /&gt;
public static PlotInfo GetPlotInfo()&lt;BR /&gt;
        {&lt;BR /&gt;
            string LAYOUT_NAME = "Layout1";&lt;BR /&gt;
            string PRINTER = "DWF6 ePlot.pc3";&lt;BR /&gt;
            string PAPERSIZE = "ISO_A1_(841.00_x_594.00_MM)";&lt;BR /&gt;
            StdScaleType SCALE = StdScaleType.ScaleToFit;&lt;BR /&gt;
            PlotRotation ROTATION = PlotRotation.Degrees000;&lt;BR /&gt;
            ClsMethods.SetLayout(LAYOUT_NAME);&lt;BR /&gt;
&lt;BR /&gt;
            PlotInfo plotInfo = new PlotInfo();&lt;BR /&gt;
            PlotInfoValidator piValidator = new PlotInfoValidator();&lt;BR /&gt;
            PlotSettings plotSet = new PlotSettings(false);&lt;BR /&gt;
            try&lt;BR /&gt;
            {&lt;BR /&gt;
&lt;BR /&gt;
                PlotSettingsValidator psValidator = PlotSettingsValidator.Current;&lt;BR /&gt;
                psValidator.RefreshLists(plotSet);&lt;BR /&gt;
&lt;BR /&gt;
                plotInfo.Layout = LayoutManager.Current.GetLayoutId(LAYOUT_NAME);&lt;BR /&gt;
                psValidator.SetPlotPaperUnits(plotSet, PlotPaperUnit.Millimeters);&lt;BR /&gt;
                psValidator.SetPlotRotation(plotSet, ROTATION);&lt;BR /&gt;
                psValidator.SetPlotType(plotSet, Autodesk.AutoCAD.DatabaseServices.PlotType.Extents);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator.SetUseStandardScale(plotSet, true);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator.SetStdScaleType(plotSet, SCALE);&lt;BR /&gt;
                psValidator.SetPlotCentered(plotSet, false);&lt;BR /&gt;
                psValidator.SetPlotOrigin(plotSet, new Point2d(0.0, 0.75));&lt;BR /&gt;
                psValidator.SetPlotConfigurationName(plotSet, PRINTER, PAPERSIZE);&lt;BR /&gt;
&lt;BR /&gt;
                psValidator = null;&lt;BR /&gt;
                plotSet.ShadePlot = PlotSettingsShadePlotType.AsDisplayed;&lt;BR /&gt;
                plotSet.PrintLineweights = true;&lt;BR /&gt;
                plotSet.ScaleLineweights = false;&lt;BR /&gt;
                plotInfo.OverrideSettings = plotSet;&lt;BR /&gt;
                piValidator.Validate(plotInfo);&lt;BR /&gt;
            }&lt;BR /&gt;
            catch (Autodesk.AutoCAD.Runtime.Exception ex)&lt;BR /&gt;
            {&lt;BR /&gt;
                MessageBox.Show(ex.Message);&lt;BR /&gt;
            }&lt;BR /&gt;
&lt;BR /&gt;
            return plotInfo;&lt;BR /&gt;
        }</description>
      <pubDate>Wed, 12 May 2010 18:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plotinfo-error/m-p/2682071#M65457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-12T18:53:10Z</dc:date>
    </item>
  </channel>
</rss>

