<?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: SetPlotWindowArea() got an offset in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342182#M35977</link>
    <description>&lt;P&gt;Yes, it is the TARGET variable that causes the offset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this post online:&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Plot-or-preview-shows-incorrect-area-of-drawing-when-plotting-limits.html" target="_blank"&gt;Plot or preview shows incorrect area of drawing when plotting limits&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how to change it by code?&lt;BR /&gt;&lt;BR /&gt;Thank you for reply so soon!&lt;/P&gt;</description>
    <pubDate>Sun, 22 May 2016 02:36:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-22T02:36:38Z</dc:date>
    <item>
      <title>SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6341629#M35975</link>
      <description>&lt;P&gt;Hello, Everyone!&amp;nbsp;I am trying to batch plot blocks by using c#.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is in some dwg files&amp;nbsp;the plot window area got an offset, but in some files the program runs quite well. The offset looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/241388iBCDD42D25AA020E3/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="offset.jpg" title="offset.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is part of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// get extents of the block&lt;BR /&gt;Point2d ptMin = block.GeometricExtents.MinPoint.Convert2d(new Plane());
Point2d ptMax = block.GeometricExtents.MaxPoint.Convert2d(new Plane());
Extents2d window = new Extents2d(ptMin, ptMax);
// set plot window
psv.SetPlotWindowArea(ps, window);
psv.SetPlotType(ps, Autodesk.AutoCAD.DatabaseServices.PlotType.Window);
psv.SetPlotCentered(ps, true);
psv.SetStdScaleType(ps, StdScaleType.ScaleToFit);&lt;/PRE&gt;&lt;P&gt;In debugging, I can see&amp;nbsp;the value of ptMin and ptMax is right, and the value in PlotInfo is also right, so I am really confused about it. By the way, I have change the UCS to WCS too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 08:58:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6341629#M35975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-21T08:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342098#M35976</link>
      <description>&lt;P&gt;Check the TARGET variable, the ones that have the offset probably have a TARGET that is not 0,0,0.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 22:52:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342098#M35976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-21T22:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342182#M35977</link>
      <description>&lt;P&gt;Yes, it is the TARGET variable that causes the offset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this post online:&amp;nbsp;&lt;A href="https://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Plot-or-preview-shows-incorrect-area-of-drawing-when-plotting-limits.html" target="_blank"&gt;Plot or preview shows incorrect area of drawing when plotting limits&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how to change it by code?&lt;BR /&gt;&lt;BR /&gt;Thank you for reply so soon!&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2016 02:36:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342182#M35977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-22T02:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342378#M35978</link>
      <description>&lt;P&gt;You have translate coordinates from WCS to DCS: &lt;A href="http://adndevblog.typepad.com/autocad/2016/05/plot-to-window-extents-using-vba.html" target="_blank"&gt;Plot To Window Extents Using VBA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;With help of Autodesk.AutoCAD.Internal.Utils.UcsToDisplay(Point3d ucsPoint, bool bPaperSpace) you can translate UCS to DCS&lt;/P&gt;
&lt;P&gt;In order to translate WCS to UCS you can use invert matrix Editor.CurrentUserCoordinateSystem&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2016 11:57:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342378#M35978</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-05-22T11:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342959#M35979</link>
      <description>Thank you so much! Now it works very well by your advice.</description>
      <pubDate>Mon, 23 May 2016 00:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/6342959#M35979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-23T00:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: SetPlotWindowArea() got an offset</title>
      <link>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/9952714#M35980</link>
      <description>&lt;P&gt;thank you my friend .&lt;/P&gt;&lt;P&gt;im try 3 days for this&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 21:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/setplotwindowarea-got-an-offset/m-p/9952714#M35980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-12-20T21:21:06Z</dc:date>
    </item>
  </channel>
</rss>

