<?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: Access Violation Exception when using ACAPI_DrawingPrimitive_ShapePrims in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Access-Violation-Exception-when-using-ACAPI-DrawingPrimitive/m-p/676153#M10545</link>
    <description>&lt;P&gt;Hi, I purpose the problem was the type conversion:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;DBPrintf("Draw Primitives type %s", primElem-&amp;gt;header.typeID);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Could you try to change %s to %d to see whether the error still happen?&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;DBPrintf("Draw Primitives type %d", primElem-&amp;gt;header.typeID);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;HTH.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Sep 2025 01:30:13 GMT</pubDate>
    <dc:creator>Hiromichi Shinkawa</dc:creator>
    <dc:date>2025-09-09T01:30:13Z</dc:date>
    <item>
      <title>Access Violation Exception when using ACAPI_DrawingPrimitive_ShapePrims</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Access-Violation-Exception-when-using-ACAPI-DrawingPrimitive/m-p/674810#M10534</link>
      <description>&lt;P&gt;While evaluating the examples in API Kit I run into the following issue. I'm getting access violation exception when&amp;nbsp;DrawPrimitives called&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;GSErrCode	ret = ACAPI_DrawOrder_DrawOrderInit();
if (ret != NoError)
	return;

API_Element	elem;
while ((ret = ACAPI_DrawOrder_DrawOrderGetNext((Int32)(APIFilt_OnVisLayer | APIFilt_OnActFloor), &amp;amp;elem.header)) == NoError) {
	if (elem.header.type != API_WallID)
		continue;

	ret = ACAPI_DrawingPrimitive_ShapePrims(elem.header, DrawPrimitives);
}
ACAPI_DrawOrder_DrawOrderTerm();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Draw primitive contains only the following code&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;static GSErrCode DrawPrimitives(const API_PrimElement* primElem,
	const void* par1,
	const void* par2,
	const void* par3)
{
	DBPrintf("Draw Primitives type %s", primElem-&amp;gt;header.typeID);
	return NoError;
}&lt;/LI-CODE&gt;&lt;P&gt;The logic is called while the story window is active. I'm currently running in the DEMO mode. Could it be the reason for the exception? Or am I doing something else wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is highly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 17:31:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Access-Violation-Exception-when-using-ACAPI-DrawingPrimitive/m-p/674810#M10534</guid>
      <dc:creator>oleh_arch</dc:creator>
      <dc:date>2025-08-27T17:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Access Violation Exception when using ACAPI_DrawingPrimitive_ShapePrims</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Access-Violation-Exception-when-using-ACAPI-DrawingPrimitive/m-p/676153#M10545</link>
      <description>&lt;P&gt;Hi, I purpose the problem was the type conversion:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;DBPrintf("Draw Primitives type %s", primElem-&amp;gt;header.typeID);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Could you try to change %s to %d to see whether the error still happen?&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;DBPrintf("Draw Primitives type %d", primElem-&amp;gt;header.typeID);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;HTH.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 01:30:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Access-Violation-Exception-when-using-ACAPI-DrawingPrimitive/m-p/676153#M10545</guid>
      <dc:creator>Hiromichi Shinkawa</dc:creator>
      <dc:date>2025-09-09T01:30:13Z</dc:date>
    </item>
  </channel>
</rss>

