<?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 Exception/Crash with ModelerAPI::Model::GetLight? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-Crash-with-ModelerAPI-Model-GetLight/m-p/281734#M2174</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;I am experiencing a problem when enumerating the lights in a model.&lt;BR /&gt;&lt;BR /&gt;- Load the S-Office sample&lt;BR /&gt;- Call ModelerAPI::Model::GetLightCount(), returns 253 lights in the model.&lt;BR /&gt;- Call ModelerAPI::Model::GetLight(4, &amp;amp;light), and argument 4 causes exception to be thrown.&lt;BR /&gt;&lt;BR /&gt;If there are 253 lights in hte model, is there a reason I can't access them from the model?&lt;BR /&gt;&lt;BR /&gt;Also, are the 253 lights the same lights that belong to the elements of the model?&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:28:49 GMT</pubDate>
    <dc:creator>drjustice</dc:creator>
    <dc:date>2021-09-14T07:28:49Z</dc:date>
    <item>
      <title>Exception/Crash with ModelerAPI::Model::GetLight?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-Crash-with-ModelerAPI-Model-GetLight/m-p/281734#M2174</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I am experiencing a problem when enumerating the lights in a model.&lt;BR /&gt;&lt;BR /&gt;- Load the S-Office sample&lt;BR /&gt;- Call ModelerAPI::Model::GetLightCount(), returns 253 lights in the model.&lt;BR /&gt;- Call ModelerAPI::Model::GetLight(4, &amp;amp;light), and argument 4 causes exception to be thrown.&lt;BR /&gt;&lt;BR /&gt;If there are 253 lights in hte model, is there a reason I can't access them from the model?&lt;BR /&gt;&lt;BR /&gt;Also, are the 253 lights the same lights that belong to the elements of the model?&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:28:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-Crash-with-ModelerAPI-Model-GetLight/m-p/281734#M2174</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-09-14T07:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exception/Crash with ModelerAPI::Model::GetLight?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Exception-Crash-with-ModelerAPI-Model-GetLight/m-p/281735#M2175</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
There are a few special lights in the project, please see the code snippet below:
&lt;PRE&gt;		for (i = 1; i &amp;lt;= nLight; i++) {
			if (elemIndex == 0) // 3 special lights
				model-&amp;gt;GetLight (i, &amp;amp;light);
			else
				elem.GetLight (i, &amp;amp;light);
&lt;/PRE&gt;

Hope this helps, Ákos</description>
      <pubDate>Wed, 14 Jul 2021 08:23:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Exception-Crash-with-ModelerAPI-Model-GetLight/m-p/281735#M2175</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2021-07-14T08:23:17Z</dc:date>
    </item>
  </channel>
</rss>

