<?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 Can't get material change in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/339870#M1498</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I use "ACAPI_Notify_CatchNewElement" to catch the modify of the element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ACAPI_Notify_CatchNewElement(nullptr, ElementEventHandlerProc);
ACAPI_Notify_InstallElementObserver(ElementEventHandlerProc);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I change the material attribute which has already been used at current surface,the observer can't get change.&lt;/P&gt;&lt;P&gt;figure1 shows the material current use.&lt;/P&gt;&lt;P&gt;figure2 shows change material.&lt;/P&gt;&lt;P&gt;However, When I change the material's texture, I can't get the change in "ElementEventHandlerProc".&lt;/P&gt;&lt;P&gt;So how should I do can get the change?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f1.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/22009i61CBC38E9AA5631D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f1.png" alt="f1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f2.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/22010iFAF0C1E7698796E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f2.png" alt="f2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 06:12:20 GMT</pubDate>
    <dc:creator>WalterWhite</dc:creator>
    <dc:date>2022-05-31T06:12:20Z</dc:date>
    <item>
      <title>Can't get material change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/339870#M1498</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I use "ACAPI_Notify_CatchNewElement" to catch the modify of the element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ACAPI_Notify_CatchNewElement(nullptr, ElementEventHandlerProc);
ACAPI_Notify_InstallElementObserver(ElementEventHandlerProc);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I change the material attribute which has already been used at current surface,the observer can't get change.&lt;/P&gt;&lt;P&gt;figure1 shows the material current use.&lt;/P&gt;&lt;P&gt;figure2 shows change material.&lt;/P&gt;&lt;P&gt;However, When I change the material's texture, I can't get the change in "ElementEventHandlerProc".&lt;/P&gt;&lt;P&gt;So how should I do can get the change?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f1.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/22009i61CBC38E9AA5631D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f1.png" alt="f1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="f2.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/22010iFAF0C1E7698796E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="f2.png" alt="f2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 06:12:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/339870#M1498</guid>
      <dc:creator>WalterWhite</dc:creator>
      <dc:date>2022-05-31T06:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get material change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/340443#M1499</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;There are two different cases I can make out from your question:&lt;BR /&gt;1. Detect if some material changed. (Not possible with ElementObservers)&lt;/P&gt;&lt;P&gt;2. Detect if the material assignment of some element is changed. (You get a APINotifyElement_Change notification for this with ElementObservers)&lt;BR /&gt;&lt;BR /&gt;I think you want case 1 correct?&lt;BR /&gt;I came up with a technique on how this might be possible. I use it for something else so I'm not 100% sure it works for this case as well. So try with care.&lt;BR /&gt;Here's a rough sketch:&lt;BR /&gt;- Make sure "Save each step" is enabled in the Data Safety settings of the AC Work Environment&lt;/P&gt;&lt;P&gt;- Use the Project Notification "APINotify_TempSave"&lt;/P&gt;&lt;P&gt;- Now you can check on every action whether your material changed (API_Attribute stuff)&lt;BR /&gt;&amp;nbsp; - this now is triggered on almost any action in AC so be careful to not use to much time to decide whether to act on it!&lt;BR /&gt;&lt;BR /&gt;Let me know if it works for you as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 09:59:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/340443#M1499</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2022-06-07T09:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get material change</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/341018#M1500</link>
      <description>&lt;P&gt;Hi bschwb&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks a lot!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Forgive me leaving a long time to reply you.I try the method you post and it really works.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 03:49:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Can-t-get-material-change/m-p/341018#M1500</guid>
      <dc:creator>WalterWhite</dc:creator>
      <dc:date>2022-06-13T03:49:29Z</dc:date>
    </item>
  </channel>
</rss>

