<?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: AcGeVoidPointerArray problem... in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7900439#M6816</link>
    <description>&lt;P&gt;not points, you get 4 AcGeCurve2d-type curves,&lt;/P&gt;&lt;P&gt;indicating that the LOOP boundary you took is not a polyline but consists of four curves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;for (int i=0;i&amp;lt;EdgePoint.length();i++)
{
	AcGeCurve2d *pGe = (AcGeCurve2d *)EdgePoint[i];

	acutPrintf(_T("\nGe Curve Type=%d"), (int)pGe-&amp;gt;type());

	if (pGe-&amp;gt;type() == AcGe::kLineSeg2d)
	{
	}
	else if (pGe-&amp;gt;type() == AcGe::kCircArc2d)
	{

	}
	else if (pGe-&amp;gt;type() == AcGe::kEllipArc2d)
	{

	}
	else if (pGe-&amp;gt;type() == AcGe::kNurbCurve2d)
	{

	}else if (pGe-&amp;gt;type() == AcGe::kCompositeCrv2d)
	{
	}
	else {
        ....
	}

}&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Apr 2018 07:49:57 GMT</pubDate>
    <dc:creator>7598165</dc:creator>
    <dc:date>2018-04-02T07:49:57Z</dc:date>
    <item>
      <title>AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7896628#M6809</link>
      <description>&lt;P&gt;how to find ARC type entity or any type entity in&amp;nbsp;AcGeVoidPointerArray...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcGeVoidPointerArray d;&lt;BR /&gt;d.setPhysicalLength(30);&lt;BR /&gt;aBloc-&amp;gt;explode(d);&lt;BR /&gt;int g = d.length();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(aBloc is pointer of a BlockRefrence..)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help..&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 12:00:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7896628#M6809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-30T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7896983#M6810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should test each pointer stored in the array if it is the expected entity.&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;PRE&gt;for (int i = 0; i &amp;lt; d.length(); i++)
{
  AcDbEntity* pEnt = (AcDbEntity*)d[i];
  if (pEnt == NULL)
    continue;
  if (pEnt-&amp;gt;isKinkOf(AcDbArc::desc()))
  {
    // Do something...
  }
}&lt;/PRE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thierry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Mar 2018 14:36:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7896983#M6810</guid>
      <dc:creator>thierry_prince</dc:creator>
      <dc:date>2018-03-30T14:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898131#M6811</link>
      <description>&lt;P&gt;thank you Sir&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 04:45:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898131#M6811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-31T04:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898364#M6812</link>
      <description>&lt;P&gt;one more problem....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if&amp;nbsp;&amp;nbsp;AcGeVoidPointerArray has axis points..so how can access those points....&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 10:50:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898364#M6812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-31T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898641#M6813</link>
      <description>&lt;P&gt;Use AcGePoint3dArray to store points instead of AcGeVoidPointerArray&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcGeVoidPointArray is used to store an array of AcGeEntity3d or AcGeEntity2d class objects&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you sure that you use the AcGevoidPointerArray stored AcDbEntity ? Not AcDbVoidPointerArray?&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 15:49:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7898641#M6813</guid>
      <dc:creator>7598165</dc:creator>
      <dc:date>2018-03-31T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7899885#M6814</link>
      <description>&lt;P&gt;There does seem to be some confusion here between the AcDb* and AcGe* namespaces. The two frameworks are different, but they use a lot of the same or similar names ("explode", "isKindOf", etc).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the AcGe world, we have type Ac&lt;STRONG&gt;Ge&lt;/STRONG&gt;Void&lt;STRONG&gt;Pointer&lt;/STRONG&gt;Array, while in the AcDb world, we have Ac&lt;STRONG&gt;Db&lt;/STRONG&gt;Void&lt;STRONG&gt;Ptr&lt;/STRONG&gt;Array. Both types are defined as AcArray&amp;lt;void *&amp;gt;, so they can be used interchangeably, but using the right identifier&amp;nbsp;makes the code a little more readable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;AcGeCurve2d&lt;/STRONG&gt;::&lt;STRONG&gt;explode&lt;/STRONG&gt;() populates an AcGeVoidPointerArray, where each array entry actually points to an &lt;STRONG&gt;AcGeEntity2d.&amp;nbsp;&lt;/STRONG&gt;Likewise, AcGeCurve3d::explode() populates an array with ptrs to AcGeEntity3d's. &lt;STRONG&gt;AcDbEntity&lt;/STRONG&gt;::explode(), otoh, gives you an AcDbVoidPtrArray containing pointers to AcDbEntity's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The original question says that aBloc is a pointer to a BlockReference, so we must be talking about an &lt;STRONG&gt;AcDbBlockReference&lt;/STRONG&gt; (since the AcGe* namespace doesn't have block references). Thus&amp;nbsp;it is calling AcDbEntity::explode(), and the solution provided above is correct about using AcDbArc::&lt;STRONG&gt;isKindOf&lt;/STRONG&gt;() etc to determine the type of AcDbEntity being pointed to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fwiw, the AcRx &lt;STRONG&gt;cast&lt;/STRONG&gt;() method might be useful besides isKindOf(). E.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;AcDbArc *pArc = AcDbArc::cast(pEnt);
if (pArc != nullptr) {
   // do stuff with pArc
}
else if (AcDbLine *pLine = AcDbLine::cast(pEnt)) {
    // do stuff with pLine
}
etc
&lt;/PRE&gt;
&lt;P&gt;And about "axis points", I'm not sure what the question is. Can you&amp;nbsp;clarify?&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>Sun, 01 Apr 2018 20:21:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7899885#M6814</guid>
      <dc:creator>autodaug</dc:creator>
      <dc:date>2018-04-01T20:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7900404#M6815</link>
      <description>&lt;P&gt;i'll try to get points on "kExternal" type Hatch ... and i use getLoopAt method ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case Polyline Hatch its easy to get points ...here getLoopAt method is working fine for getting vertices..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what can i do for kExternal type Hatch..??&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;&lt;P&gt;code::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcGeVoidPointerArray edgepoint;&lt;BR /&gt;edgepoint.setPhysicalLength(30);&lt;BR /&gt;AcGeIntArray edgetype;&lt;BR /&gt;edgetype.setPhysicalLength(50);&lt;BR /&gt;Adesk::Int32 loopType;&lt;BR /&gt;&lt;BR /&gt;aHac-&amp;gt;getLoopAt(ind, loopType, edgepoint, edgetype);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;acutPrintf(_T("\n%d"), edgepoint.length());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where edgepoint.length gives....4&lt;/P&gt;&lt;P&gt;which is total no. of vertices in hatch..&lt;/P&gt;&lt;P&gt;how can i get the x,y,z values of that vertices??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls help...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 07:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7900404#M6815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-02T07:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: AcGeVoidPointerArray problem...</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7900439#M6816</link>
      <description>&lt;P&gt;not points, you get 4 AcGeCurve2d-type curves,&lt;/P&gt;&lt;P&gt;indicating that the LOOP boundary you took is not a polyline but consists of four curves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;for (int i=0;i&amp;lt;EdgePoint.length();i++)
{
	AcGeCurve2d *pGe = (AcGeCurve2d *)EdgePoint[i];

	acutPrintf(_T("\nGe Curve Type=%d"), (int)pGe-&amp;gt;type());

	if (pGe-&amp;gt;type() == AcGe::kLineSeg2d)
	{
	}
	else if (pGe-&amp;gt;type() == AcGe::kCircArc2d)
	{

	}
	else if (pGe-&amp;gt;type() == AcGe::kEllipArc2d)
	{

	}
	else if (pGe-&amp;gt;type() == AcGe::kNurbCurve2d)
	{

	}else if (pGe-&amp;gt;type() == AcGe::kCompositeCrv2d)
	{
	}
	else {
        ....
	}

}&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Apr 2018 07:49:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/acgevoidpointerarray-problem/m-p/7900439#M6816</guid>
      <dc:creator>7598165</dc:creator>
      <dc:date>2018-04-02T07:49:57Z</dc:date>
    </item>
  </channel>
</rss>

