<?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: Find the objects which are visible from current viewport using AutoCAD API C# in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/find-the-objects-which-are-visible-from-current-viewport-using/m-p/10785371#M14476</link>
    <description>&lt;P&gt;Basically what you need to do is find the Viewport's boundary points (assuming it is regular rectangle, then 4 corner points) and calculate their projected points in ModelSpace with proper transformation (Matrix3d). As long as your get the projected rectangle/polygon in ModelSpace, you can test which entities are inside the rectangle/Polygon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a relevant discussion where you can find good code for getting a Matrix3d to transform coordinates from PaperSpace to ModelSpace, or the other way around:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=34590.msg398539#msg398539" target="_blank" rel="noopener"&gt;http://www.theswamp.org/index.php?topic=34590.msg398539#msg398539&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Nov 2021 15:17:28 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2021-11-27T15:17:28Z</dc:date>
    <item>
      <title>Find the objects which are visible from current viewport using AutoCAD API C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-the-objects-which-are-visible-from-current-viewport-using/m-p/10783657#M14475</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can any one help to find the objects which are visible from the current viewport?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since, my current layout name is "ABC" viewport id is "123456". Now, can I find the items which are completely in different list and partially in a different list, visible from from "ABC" layout and belongs from the viewport which have the id "123456"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 12:59:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-the-objects-which-are-visible-from-current-viewport-using/m-p/10783657#M14475</guid>
      <dc:creator>kite15</dc:creator>
      <dc:date>2021-11-26T12:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Find the objects which are visible from current viewport using AutoCAD API C#</title>
      <link>https://forums.autodesk.com/t5/net-forum/find-the-objects-which-are-visible-from-current-viewport-using/m-p/10785371#M14476</link>
      <description>&lt;P&gt;Basically what you need to do is find the Viewport's boundary points (assuming it is regular rectangle, then 4 corner points) and calculate their projected points in ModelSpace with proper transformation (Matrix3d). As long as your get the projected rectangle/polygon in ModelSpace, you can test which entities are inside the rectangle/Polygon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a relevant discussion where you can find good code for getting a Matrix3d to transform coordinates from PaperSpace to ModelSpace, or the other way around:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=34590.msg398539#msg398539" target="_blank" rel="noopener"&gt;http://www.theswamp.org/index.php?topic=34590.msg398539#msg398539&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Nov 2021 15:17:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/find-the-objects-which-are-visible-from-current-viewport-using/m-p/10785371#M14476</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2021-11-27T15:17:28Z</dc:date>
    </item>
  </channel>
</rss>

