<?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: AcdbHatch::getLoopAt Problem ... in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883915#M6844</link>
    <description>&lt;P&gt;Autocad 2018&lt;/P&gt;&lt;P&gt;Visual Studio 2015..&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 12:42:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-26T12:42:24Z</dc:date>
    <item>
      <title>AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883802#M6840</link>
      <description>&lt;P&gt;try to get hatch boundry vertex by using " getLoopAt " method but Autocad shows some "Assertion Failed" error..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDbHatch* aHac = AcDbHatch::cast(aEnt);&lt;/P&gt;&lt;P&gt;if (aHac-&amp;gt;loopTypeAt(ind) &amp;amp; AcDbHatch::kPolyline)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;Adesk::Int32 loopType;&lt;BR /&gt;&lt;BR /&gt;AcGePoint2dArray vertices;&lt;BR /&gt;AcGeDoubleArray bulges;&lt;BR /&gt;&lt;BR /&gt;aHac-&amp;gt;getLoopAt(ind,loopType,vertices,bulges);&lt;BR /&gt;int nver = vertices.length();&lt;BR /&gt;acutPrintf(_T("\n%d"),nver);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:11:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883802#M6840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T12:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883824#M6841</link>
      <description>&lt;P&gt;It is look like value of &lt;EM&gt;&lt;STRONG&gt;ind &amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt; is not setting before &lt;EM&gt;&lt;STRONG&gt;aHac-&amp;gt;loopTypeAt(ind)&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp; calling.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883824#M6841</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2018-03-26T12:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883849#M6842</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for replay..but i have already given "ind (index) " value ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int numVer = aHac-&amp;gt;numLoops();&lt;BR /&gt;acutPrintf(_T("\n%d"), numVer);&lt;BR /&gt;for (int ind = 0; ind &amp;lt; numVer; ind++)&lt;BR /&gt;{&lt;BR /&gt;//acutPrintf(_T("\npolyline"));&lt;BR /&gt;&lt;BR /&gt;if (aHac-&amp;gt;loopTypeAt(ind) &amp;amp; AcDbHatch::kPolyline)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;int32_t loopType;&lt;BR /&gt;&lt;BR /&gt;AcGePoint2dArray vertices;&lt;BR /&gt;AcGeDoubleArray bulges;&lt;BR /&gt;&lt;BR /&gt;aHac-&amp;gt;getLoopAt(ind,loopType,vertices,bulges);&lt;BR /&gt;int nver = vertices.length();&lt;BR /&gt;acutPrintf(_T("\n%d"),nver);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883849#M6842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T12:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883901#M6843</link>
      <description>&lt;P&gt;1. AutoCAD version?&lt;/P&gt;
&lt;P&gt;2. Visual Studio version and updates?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:40:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883901#M6843</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2018-03-26T12:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883915#M6844</link>
      <description>&lt;P&gt;Autocad 2018&lt;/P&gt;&lt;P&gt;Visual Studio 2015..&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:42:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883915#M6844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T12:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883920#M6845</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous написал (-а):&lt;BR /&gt;
&lt;P&gt;Autocad 2018&lt;/P&gt;
&lt;P&gt;Visual Studio 2015..&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Visual Studio 2015 or Visual Studio 2015 &lt;U&gt;with Update 3&lt;/U&gt; ???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.: Try this sample code: &lt;A href="http://adndevblog.typepad.com/autocad/2012/04/perimeter-of-a-hatch-using-objectarx-and-autocad-net-api.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/04/perimeter-of-a-hatch-using-objectarx-and-autocad-net-api.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:45:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883920#M6845</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2018-03-26T12:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883933#M6846</link>
      <description>&lt;P&gt;thanks Sir ...i already see this example ...&lt;/P&gt;&lt;P&gt;is their any other method to get the vertices of the Hatch..(Polyline)..&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 12:49:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7883933#M6846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T12:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7890920#M6847</link>
      <description>&lt;P&gt;&amp;nbsp; code::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;if (aHac-&amp;gt;loopTypeAt(ind) &amp;amp; AcDbHatch::kExternal)&lt;BR /&gt;{&lt;BR /&gt;acutPrintf(_T("\nexternal hatch"));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;AcGeVoidPointerArray vert;&lt;BR /&gt;vert.setPhysicalLength(50);&lt;BR /&gt;&lt;BR /&gt;AcGeIntArray bulges;&lt;BR /&gt;&lt;BR /&gt;Adesk::Int32 loopType;&lt;BR /&gt;&lt;BR /&gt;aHac-&amp;gt;getLoopAt(ind,loopType, vert, bulges);&lt;BR /&gt;acutPrintf(_T("\n%d"), vert.length());&lt;/P&gt;&lt;P&gt;for (int i=0;i&amp;lt;vert.length()+1;i++)&lt;BR /&gt;{&lt;BR /&gt;if (i == vert.length())&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'll try to get the "Acdb::kexternal" Hatch vertices ...but autocad get crash ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help..&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 13:43:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7890920#M6847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-28T13:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7891672#M6848</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you expect help, then attach an example of the ObjectARX project (in zip) and an example of a dwg-file for testing.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 17:05:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7891672#M6848</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2018-03-28T17:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7896642#M6849</link>
      <description>&lt;P&gt;code and dwg file&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 12:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7896642#M6849</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-30T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7897043#M6850</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous написал (-а):&lt;BR /&gt;
&lt;P&gt;code and dwg file&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is not what I asked for.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:58:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7897043#M6850</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2018-03-30T14:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: AcdbHatch::getLoopAt Problem ...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7899913#M6851</link>
      <description>&lt;P&gt;The assert message appears to be coming from MSVC's debug lib and is saying there's a heap corruption.&amp;nbsp;There may be a mismatch between the app's c-runtime lib and acad'. E.g., if one is the debug lib and the other is the release lib, or maybe they are from different MSVC versions. The heap corruption can happen when memory is allocated from one runtime heap and then deleted onto another heap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To work around this, you might try "pre-allocating" your arrays' buffers before calling the API. That way, acad will not need to grow your array, and so all allocation and de-allocation of your array buffers will be happening on your app's heap and none on acad's.&amp;nbsp; E.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AcGePoint2dArray vertices;
vertices.setPhysicalLength(1000);    // pre-allocate array so acad won't grow it
AcGeDoubleArray bulges;
bulges.setPhysicalLength(1000);     // use a size guaranteed to be big enuff

aHac-&amp;gt;getLoopAt(ind,loopType,vertices,bulges);
assert(vertices.length() &amp;lt; 1000);      // make sure we're pre-allocating enough
&lt;/PRE&gt;
&lt;P&gt;This is kind of kludgy, but it's worth a try. If you google around for setPhysicalLength(), you can find other discussions of this workaround. However, if there is a runtime heap mismatch going on, then I would think you may run into stability problems in other areas too..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Apr 2018 20:46:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acdbhatch-getloopat-problem/m-p/7899913#M6851</guid>
      <dc:creator>autodaug</dc:creator>
      <dc:date>2018-04-01T20:46:41Z</dc:date>
    </item>
  </channel>
</rss>

