<?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: Elements vs Lights in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Elements-vs-Lights/m-p/272251#M2091</link>
    <description>Replying to my own question here.&lt;BR /&gt;
&lt;BR /&gt;
It appears that the lights at the element level are lights that are part of the element. &lt;BR /&gt;
&lt;BR /&gt;
For example, if you have a lamp with one light bulb, then you'll have 1 light for this element. The bulb's position will be located at the place in the lamp where light should be emitted.&lt;BR /&gt;
&lt;BR /&gt;
As another example, if you have an overhead ceiling light with 3 neon tubes in the light fixture, then the element will have 3 lights.&lt;BR /&gt;
&lt;BR /&gt;
Enumerating the lights at the model level gives global lights.</description>
    <pubDate>Sat, 26 Jun 2021 00:34:57 GMT</pubDate>
    <dc:creator>drjustice</dc:creator>
    <dc:date>2021-06-26T00:34:57Z</dc:date>
    <item>
      <title>Elements vs Lights</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Elements-vs-Lights/m-p/272250#M2090</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi. I'm confused about how to treat lights. I use the ModelerAPI.&lt;BR /&gt;&lt;BR /&gt;From the model, I can get a list of all elements (walls, stairs, windows, doors, handrails, etc) and get their GUIDs. There is also an element of type LightElement, so that's great.&lt;BR /&gt;&lt;BR /&gt;From a ModelerAPI::Model instance, I can enumerate lights by index, and it returns instances of ModelerAPI:Light classes (containing color, spot direction, range, etc).&lt;BR /&gt;&lt;BR /&gt;I can also enumerate lights by index from a ModelerAPI::Element, same as from a ModelerAPI::Model.&lt;BR /&gt;&lt;BR /&gt;I'm confused about what these ModelerAPI::Light instances refer to.&lt;BR /&gt;&lt;BR /&gt;I can see 4 possibilities for what it means to enumerate lights by index from the model or an element. Either:&lt;BR /&gt;&lt;BR /&gt;(1) A ceiling or wall element has lights attached to it and we can enumerate such lights. So for example, if there was a ceiling with 12 embedded pot lights, I could enumerate lights from the ceiling element, and I would get those 12 pot lights. (That could make sense)&lt;BR /&gt;&lt;BR /&gt;(2) enumerating lights from an element only returns lights when the element is actually of type LightElement. In this case, enumerating (possibly multiple) lights means something like a light fixture with multiple light bulbs. (Might make sense too)&lt;BR /&gt;&lt;BR /&gt;(3) there are, somehow, lights in the model that aren't actually Elements and aren't identifiable with a GUID. (God I hope not)&lt;BR /&gt;&lt;BR /&gt;(4) refers to the list of lights that participate in the illumination of this element. (Doesn't make much sense to me)&lt;BR /&gt;&lt;BR /&gt;So, which one is it?&lt;BR /&gt;&lt;BR /&gt;If it's case (1), how would I find, only armed with an index and/or a ModelerAPI::Light instance, the GUID of the corresponding light element ? The ModelerAPI::Light class only contains data like color, spot direction, falloff, but nothing about the element it comes from.&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:36:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Elements-vs-Lights/m-p/272250#M2090</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-09-14T07:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Elements vs Lights</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Elements-vs-Lights/m-p/272251#M2091</link>
      <description>Replying to my own question here.&lt;BR /&gt;
&lt;BR /&gt;
It appears that the lights at the element level are lights that are part of the element. &lt;BR /&gt;
&lt;BR /&gt;
For example, if you have a lamp with one light bulb, then you'll have 1 light for this element. The bulb's position will be located at the place in the lamp where light should be emitted.&lt;BR /&gt;
&lt;BR /&gt;
As another example, if you have an overhead ceiling light with 3 neon tubes in the light fixture, then the element will have 3 lights.&lt;BR /&gt;
&lt;BR /&gt;
Enumerating the lights at the model level gives global lights.</description>
      <pubDate>Sat, 26 Jun 2021 00:34:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Elements-vs-Lights/m-p/272251#M2091</guid>
      <dc:creator>drjustice</dc:creator>
      <dc:date>2021-06-26T00:34:57Z</dc:date>
    </item>
  </channel>
</rss>

