<?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: in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331090#M41010</link>
    <description>thank you very much, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
nicel3&lt;BR /&gt;
ondraw@hotmail.com&lt;BR /&gt;
---------------------------&lt;BR /&gt;
"zatopek" &lt;ZATOPEK&gt; wrote in message&lt;BR /&gt;
news:E23018745BF9A5F40B7BB027CADC4334@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; You will have to open the AcDbRegion, explode it. Then use the&lt;BR /&gt;
&amp;gt; AcDbVoidPtrArray returned. Note that the original Region will not be&lt;BR /&gt;
&amp;gt; exploded as AutoCAD-explode, but you will get all the entities that&lt;BR /&gt;
autocad&lt;BR /&gt;
&amp;gt; would have created in the array. You will have to erase the region your&lt;BR /&gt;
self&lt;BR /&gt;
&amp;gt; if thats what you want to do.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Now to the fun part!&lt;BR /&gt;
&amp;gt; The array may include Lines, Arcs and/or Splines. So you have to create&lt;BR /&gt;
your&lt;BR /&gt;
&amp;gt; polyline from this array all by your self.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Glad niceguyl3" &lt;NICEGUYL3&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:D4A126D590099675B5FB4573B3088793@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; whitch command convert a region to a polyline?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
&amp;gt; &amp;gt; nicel3&lt;BR /&gt;
&amp;gt; &amp;gt; ondraw@hotmail.com&lt;BR /&gt;
&amp;gt; &amp;gt; ---------------------------&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/NICEGUYL3&gt;&lt;/ZATOPEK&gt;</description>
    <pubDate>Fri, 03 May 2002 02:31:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-05-03T02:31:35Z</dc:date>
    <item>
      <title>how can i convert a region to a polyline?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331088#M41008</link>
      <description>whitch command convert a region to a polyline?&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
nicel3&lt;BR /&gt;
ondraw@hotmail.com&lt;BR /&gt;
---------------------------</description>
      <pubDate>Mon, 29 Apr 2002 23:00:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331088#M41008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-04-29T23:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: how can i convert a region to a polyline?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331089#M41009</link>
      <description>You will have to open the AcDbRegion, explode it. Then use the&lt;BR /&gt;
AcDbVoidPtrArray returned. Note that the original Region will not be&lt;BR /&gt;
exploded as AutoCAD-explode, but you will get all the entities that autocad&lt;BR /&gt;
would have created in the array. You will have to erase the region your self&lt;BR /&gt;
if thats what you want to do.&lt;BR /&gt;
&lt;BR /&gt;
Now to the fun part!&lt;BR /&gt;
The array may include Lines, Arcs and/or Splines. So you have to create your&lt;BR /&gt;
polyline from this array all by your self.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Glad niceguyl3" &lt;NICEGUYL3&gt; wrote in message&lt;BR /&gt;
news:D4A126D590099675B5FB4573B3088793@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; whitch command convert a region to a polyline?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
&amp;gt; nicel3&lt;BR /&gt;
&amp;gt; ondraw@hotmail.com&lt;BR /&gt;
&amp;gt; ---------------------------&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/NICEGUYL3&gt;</description>
      <pubDate>Tue, 30 Apr 2002 00:24:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331089#M41009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-04-30T00:24:27Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331090#M41010</link>
      <description>thank you very much, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
nicel3&lt;BR /&gt;
ondraw@hotmail.com&lt;BR /&gt;
---------------------------&lt;BR /&gt;
"zatopek" &lt;ZATOPEK&gt; wrote in message&lt;BR /&gt;
news:E23018745BF9A5F40B7BB027CADC4334@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; You will have to open the AcDbRegion, explode it. Then use the&lt;BR /&gt;
&amp;gt; AcDbVoidPtrArray returned. Note that the original Region will not be&lt;BR /&gt;
&amp;gt; exploded as AutoCAD-explode, but you will get all the entities that&lt;BR /&gt;
autocad&lt;BR /&gt;
&amp;gt; would have created in the array. You will have to erase the region your&lt;BR /&gt;
self&lt;BR /&gt;
&amp;gt; if thats what you want to do.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Now to the fun part!&lt;BR /&gt;
&amp;gt; The array may include Lines, Arcs and/or Splines. So you have to create&lt;BR /&gt;
your&lt;BR /&gt;
&amp;gt; polyline from this array all by your self.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Glad niceguyl3" &lt;NICEGUYL3&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:D4A126D590099675B5FB4573B3088793@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; whitch command convert a region to a polyline?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; --&lt;BR /&gt;
&amp;gt; &amp;gt; ~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
&amp;gt; &amp;gt; nicel3&lt;BR /&gt;
&amp;gt; &amp;gt; ondraw@hotmail.com&lt;BR /&gt;
&amp;gt; &amp;gt; ---------------------------&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/NICEGUYL3&gt;&lt;/ZATOPEK&gt;</description>
      <pubDate>Fri, 03 May 2002 02:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/331090#M41010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-05-03T02:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: how can i convert a region to a polyline?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12665559#M41011</link>
      <description>&lt;P&gt;can any one share the code of this logic ?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 05:55:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12665559#M41011</guid>
      <dc:creator>jignesh.rana</dc:creator>
      <dc:date>2024-03-26T05:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: how can i convert a region to a polyline?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12672174#M41012</link>
      <description>&lt;P&gt;To convert a region to a polyline in AutoCAD using ObjectARX, you would typically follow these steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;AcDbRegion&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;object.&lt;/LI&gt;&lt;LI&gt;Explode the region to get the constituent curves.&lt;/LI&gt;&lt;LI&gt;Use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;AcDbVoidPtrArray&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;returned by the explode operation.&lt;/LI&gt;&lt;LI&gt;Create a new polyline and add the exploded curves to it.&lt;/LI&gt;&lt;LI&gt;Erase the original region if necessary.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here’s a simplified code snippet that outlines the process:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;// Assume pRegion is a pointer to your AcDbRegion object
AcDbVoidPtrArray curveSegments;
pRegion-&amp;gt;explode(curveSegments); // Explode the region into constituent curves

// Create a new polyline
AcDbPolyline* pPolyline = new AcDbPolyline();

// Iterate through the curve segments and add them to the polyline
for (int i = 0; i &amp;lt; curveSegments.length(); ++i) {
    AcDbEntity* pEntity = static_cast&amp;lt;AcDbEntity*&amp;gt;(curveSegments[i]);
    // Check if the entity is a line, arc, or spline and add it to the polyline
    // You may need to convert arcs and splines to polyline segments
}

// Add the polyline to the drawing and erase the original region if needed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Remember to handle memory management appropriately when working with pointers and arrays in ObjectARX.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2024 14:09:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12672174#M41012</guid>
      <dc:creator>wispoxy</dc:creator>
      <dc:date>2024-03-28T14:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: how can i convert a region to a polyline?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12686307#M41013</link>
      <description>&lt;P&gt;See &lt;A title="Create close polyline from Region" href="https://forums.autodesk.com/t5/objectarx/create-close-polyline-from-region/m-p/12677165#M43350" target="_blank" rel="noopener"&gt;this topic&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 09:32:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-can-i-convert-a-region-to-a-polyline/m-p/12686307#M41013</guid>
      <dc:creator>tbrammer</dc:creator>
      <dc:date>2024-04-04T09:32:25Z</dc:date>
    </item>
  </channel>
</rss>

