<?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 How to use correctly the PlotSettingsValidator in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3739156#M51963</link>
    <description>&lt;P&gt;I have a view on paper pace : Name "1200-900"&amp;nbsp; size : 1200 x 900 unit&amp;nbsp; (Unit : mm)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my little prg vb.bet :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.....

                Dim tr As Transaction = db.TransactionManager.StartTransaction()

                Using (tr)
                    'Dim bt As BlockTable = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
                    Dim btr As BlockTableRecord = tr.GetObject(db.CurrentSpaceId, OpenMode.ForRead)
                    Dim lo As Layout = tr.GetObject(btr.LayoutId, OpenMode.ForRead)



                    Dim pi As PlotInfo = New PlotInfo()
                    pi.Layout = btr.LayoutId


                    '// We need a PlotSettings object
                    '// based on the layout settings
                    '// witch we then customize



                    Dim ps As PlotSettings = New PlotSettings(lo.ModelType)
                    ps.CopyFrom(lo)

                    '// The PlotSettingsValidator helps
                    '// create a valid PlotSettings object

                    Dim psv As PlotSettingsValidator = PlotSettingsValidator.Current

                    'retrieve the name of vue
                    Dim NomView As String = ChoixVue()

                    If NomView &amp;lt;&amp;gt; "" Then
                        psv.SetPlotViewName(ps, NomView) '"1200-900")
                        psv.SetPlotType(ps, Autodesk.AutoCAD.DatabaseServices.PlotType.View)


                        'HERE MY PROB !!
                        psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters)
                        
                        'psv.SetUseStandardScale(ps, True)
                        'psv.SetStdScaleType(ps, StdScaleType.StdScale1To50)
                        'Dim Scale As CustomScale = New CustomScale(1, 30)
                        'psv.SetStdScale(ps, 0.0)
                        'psv.SetCustomPrintScale(ps, Scale)


                        'psv.SetPlotCentered(ps, True)
                        'psv.RefreshLists(ps)

                        '***** Format paper


                        
                        psv.SetPlotConfigurationName(ps, "DWG To PDF(Ce).pc3", "UserDefinedMetric (900.00 x 1500.00mm)")
                        '// We need to link the PlotInfo to the
                        '// PlotSettings and then validate it

                        pi.OverrideSettings = ps
                        Dim piv As PlotInfoValidator = New PlotInfoValidator()

                        piv.MediaMatchingPolicy = MatchingPolicy.MatchEnabled
                        piv.Validate(pi)


                        If PlotFactory.ProcessPlotState = ProcessPlotState.NotPlotting Then


.......&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I cant understand the :&lt;/P&gt;&lt;P&gt;- psv.SetStdScaleType(ps, StdScaleType.xxxx)&lt;/P&gt;&lt;P&gt;--&amp;gt; If i use 1to1 i dont see my drawing&lt;/P&gt;&lt;P&gt;--&amp;gt; if i use 1to 20 i see my draw&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i want create a draw with exacty the size of my view. (The size is already finewith the paper of my DesignJet T610)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how i can just retrieve the good page layout. (CTRL+P and enter work fine)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is calculate the StdScaleType.StdScale1To50&amp;nbsp; or StdScaleType.StdScale1To1 ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2012 16:35:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-12-18T16:35:33Z</dc:date>
    <item>
      <title>How to use correctly the PlotSettingsValidator</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3739156#M51963</link>
      <description>&lt;P&gt;I have a view on paper pace : Name "1200-900"&amp;nbsp; size : 1200 x 900 unit&amp;nbsp; (Unit : mm)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my little prg vb.bet :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.....

                Dim tr As Transaction = db.TransactionManager.StartTransaction()

                Using (tr)
                    'Dim bt As BlockTable = tr.GetObject(db.BlockTableId, OpenMode.ForRead)
                    Dim btr As BlockTableRecord = tr.GetObject(db.CurrentSpaceId, OpenMode.ForRead)
                    Dim lo As Layout = tr.GetObject(btr.LayoutId, OpenMode.ForRead)



                    Dim pi As PlotInfo = New PlotInfo()
                    pi.Layout = btr.LayoutId


                    '// We need a PlotSettings object
                    '// based on the layout settings
                    '// witch we then customize



                    Dim ps As PlotSettings = New PlotSettings(lo.ModelType)
                    ps.CopyFrom(lo)

                    '// The PlotSettingsValidator helps
                    '// create a valid PlotSettings object

                    Dim psv As PlotSettingsValidator = PlotSettingsValidator.Current

                    'retrieve the name of vue
                    Dim NomView As String = ChoixVue()

                    If NomView &amp;lt;&amp;gt; "" Then
                        psv.SetPlotViewName(ps, NomView) '"1200-900")
                        psv.SetPlotType(ps, Autodesk.AutoCAD.DatabaseServices.PlotType.View)


                        'HERE MY PROB !!
                        psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters)
                        
                        'psv.SetUseStandardScale(ps, True)
                        'psv.SetStdScaleType(ps, StdScaleType.StdScale1To50)
                        'Dim Scale As CustomScale = New CustomScale(1, 30)
                        'psv.SetStdScale(ps, 0.0)
                        'psv.SetCustomPrintScale(ps, Scale)


                        'psv.SetPlotCentered(ps, True)
                        'psv.RefreshLists(ps)

                        '***** Format paper


                        
                        psv.SetPlotConfigurationName(ps, "DWG To PDF(Ce).pc3", "UserDefinedMetric (900.00 x 1500.00mm)")
                        '// We need to link the PlotInfo to the
                        '// PlotSettings and then validate it

                        pi.OverrideSettings = ps
                        Dim piv As PlotInfoValidator = New PlotInfoValidator()

                        piv.MediaMatchingPolicy = MatchingPolicy.MatchEnabled
                        piv.Validate(pi)


                        If PlotFactory.ProcessPlotState = ProcessPlotState.NotPlotting Then


.......&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I cant understand the :&lt;/P&gt;&lt;P&gt;- psv.SetStdScaleType(ps, StdScaleType.xxxx)&lt;/P&gt;&lt;P&gt;--&amp;gt; If i use 1to1 i dont see my drawing&lt;/P&gt;&lt;P&gt;--&amp;gt; if i use 1to 20 i see my draw&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i want create a draw with exacty the size of my view. (The size is already finewith the paper of my DesignJet T610)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So how i can just retrieve the good page layout. (CTRL+P and enter work fine)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is calculate the StdScaleType.StdScale1To50&amp;nbsp; or StdScaleType.StdScale1To1 ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 16:35:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3739156#M51963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-18T16:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use correctly the PlotSettingsValidator</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3739636#M51964</link>
      <description>&lt;PRE&gt;psv.SetPlotPaperUnits(ps, PlotPaperUnit.Millimeters)
Dim Scale As CustomScale = New CustomScale(1, 25.4)
psv.SetCustomPrintScale(ps, Scale)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have now my correct size --&amp;gt; i have to scale the view with the ratio of 25.4 (Inche / mm)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have set my plotpaperunits to mm&amp;nbsp; but why i need to convert the scale to units inche ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why ?&lt;/P&gt;&lt;P&gt;How i can set the corret units to mm ?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2012 07:21:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3739636#M51964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T07:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use correctly the PlotSettingsValidator</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3741899#M51965</link>
      <description>&lt;P&gt;I'm not really a Plot expert, but what are the UNITS of the DWG setup to be?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2012 21:59:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-use-correctly-the-plotsettingsvalidator/m-p/3741899#M51965</guid>
      <dc:creator>fenton_webb</dc:creator>
      <dc:date>2012-12-21T21:59:50Z</dc:date>
    </item>
  </channel>
</rss>

