<?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 Re: PlotSettingsValidator.SetPlotPaperUnits in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/plotsettingsvalidator-setplotpaperunits/m-p/6025041#M37214</link>
    <description>&lt;P&gt;Never ceases to fail, as soon as I post I figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take the original layout and copy the plotsettings back in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (Transaction tr = db.TransactionManager.StartTransaction())
                        {
                            Layout openLay = (Layout)tr.GetObject(lay.ObjectId, OpenMode.ForWrite);

                            PlotSettings ps = new PlotSettings(openLay.ModelType);
                            ps.CopyFrom(openLay);

                            PlotSettingsValidator psv = PlotSettingsValidator.Current;
                            psv.RefreshLists(openLay);
                            psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters);
                          
                            psv.SetCurrentStyleSheet(ps, "Color.ctb");

                            &lt;U&gt;openLay.CopyFrom(ps);&lt;/U&gt;

                            tr.Commit();
                        }&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Feb 2016 21:46:16 GMT</pubDate>
    <dc:creator>mordend</dc:creator>
    <dc:date>2016-02-04T21:46:16Z</dc:date>
    <item>
      <title>PlotSettingsValidator.SetPlotPaperUnits</title>
      <link>https://forums.autodesk.com/t5/net-forum/plotsettingsvalidator-setplotpaperunits/m-p/6025017#M37213</link>
      <description>&lt;P&gt;I am having issues with the&amp;nbsp;PlotSettingsValidator&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my end goal is really to just change the&amp;nbsp;SetCurrentStyleSheet but when I do this it seems to change the PaperUnits to inches and not converting the listed scale, messing with the resulting plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot seem to change the&amp;nbsp;SetPlotPaperUnits either, the changes dont take effect in the dwg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; using (Transaction tr = db.TransactionManager.StartTransaction())
                        {
                            Layout openLay = (Layout)tr.GetObject(lay.ObjectId, OpenMode.ForWrite);

                            PlotSettings ps = new PlotSettings(openLay .ModelType);
                            ps.CopyFrom(openLay);                            

                            PlotSettingsValidator psv = PlotSettingsValidator.Current;
                            psv.RefreshLists(openLay);
                            psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters);                            

                            psv.SetCurrentStyleSheet(ps, "Color.ctb");

                            tr.Commit();
                        }&lt;/PRE&gt;&lt;P&gt;Anybody have any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:33:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plotsettingsvalidator-setplotpaperunits/m-p/6025017#M37213</guid>
      <dc:creator>mordend</dc:creator>
      <dc:date>2016-02-04T21:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: PlotSettingsValidator.SetPlotPaperUnits</title>
      <link>https://forums.autodesk.com/t5/net-forum/plotsettingsvalidator-setplotpaperunits/m-p/6025041#M37214</link>
      <description>&lt;P&gt;Never ceases to fail, as soon as I post I figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take the original layout and copy the plotsettings back in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using (Transaction tr = db.TransactionManager.StartTransaction())
                        {
                            Layout openLay = (Layout)tr.GetObject(lay.ObjectId, OpenMode.ForWrite);

                            PlotSettings ps = new PlotSettings(openLay.ModelType);
                            ps.CopyFrom(openLay);

                            PlotSettingsValidator psv = PlotSettingsValidator.Current;
                            psv.RefreshLists(openLay);
                            psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters);
                          
                            psv.SetCurrentStyleSheet(ps, "Color.ctb");

                            &lt;U&gt;openLay.CopyFrom(ps);&lt;/U&gt;

                            tr.Commit();
                        }&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Feb 2016 21:46:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/plotsettingsvalidator-setplotpaperunits/m-p/6025041#M37214</guid>
      <dc:creator>mordend</dc:creator>
      <dc:date>2016-02-04T21:46:16Z</dc:date>
    </item>
  </channel>
</rss>

