<?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: How to Check if a Block is Inside a Polyline in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-check-if-a-block-is-inside-a-polyline/m-p/13672942#M85228</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can check if the center of the block extents is inside the polyline and if there's no intersection between the block and the polyline.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jun 2025 14:26:42 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2025-06-09T14:26:42Z</dc:date>
    <item>
      <title>How to Check if a Block is Inside a Polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-if-a-block-is-inside-a-polyline/m-p/13672910#M85225</link>
      <description>&lt;P&gt;I'm building an application that needs to run both in interactive &lt;STRONG&gt;AutoCAD&lt;/STRONG&gt; and in &lt;STRONG&gt;headless/cloud environments&lt;/STRONG&gt; such as the &lt;STRONG&gt;Design Automation API or accoreconsole.exe&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In AutoCAD, users may place blocks inside a polyline, I need to programmatically determine whether a block is completely within a polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I can't use built-in methods like &lt;STRONG&gt;SelectWindowPolygon&lt;/STRONG&gt; or &lt;STRONG&gt;SelectCrossingPolygon&lt;/STRONG&gt; in headless mode, I've tried the following approaches:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Bounding Box Method:&lt;/STRONG&gt;&lt;BR /&gt;I created a bounding box using the minimum and maximum points of the block and checked whether this box is completely inside the polyline. However, in some cases, the bounding box extends beyond the polyline even though the block visually appears to be inside it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Base Point Method:&lt;/STRONG&gt;&lt;BR /&gt;I checked whether the base point of the block is inside the polyline. But in some cases, the base point is outside, even though the block visually appears inside the polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question:&lt;/STRONG&gt;&lt;BR /&gt;Is there any reliable way to get the actual &lt;STRONG&gt;minimum and maximum&lt;/STRONG&gt; points that &lt;STRONG&gt;represent the visible extent&lt;/STRONG&gt; of a block? Or are there &lt;STRONG&gt;any other methods/commands&lt;/STRONG&gt; that can help determine whether a block is inside a polyline, &lt;STRONG&gt;especially in a headless/cloud environment?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions or guidance would be greatly appreciated. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 14:05:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-if-a-block-is-inside-a-polyline/m-p/13672910#M85225</guid>
      <dc:creator>csharp_dev</dc:creator>
      <dc:date>2025-06-09T14:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Check if a Block is Inside a Polyline</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-check-if-a-block-is-inside-a-polyline/m-p/13672942#M85228</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can check if the center of the block extents is inside the polyline and if there's no intersection between the block and the polyline.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 14:26:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-check-if-a-block-is-inside-a-polyline/m-p/13672942#M85228</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2025-06-09T14:26:42Z</dc:date>
    </item>
  </channel>
</rss>

