<?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 How To Hook And Cancel When Delete Element in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Hook-And-Cancel-When-Delete-Element/m-p/338596#M1480</link>
    <description>&lt;P&gt;Please Teach me.&lt;/P&gt;
&lt;P&gt;How To Hook And Cancel When Delete Element.&lt;/P&gt;
&lt;P&gt;I catch DELETE Handler&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;static GSErrCode __ACENV_CALL ElementEventHandler(const API_NotifyElementType *elemType) {
GSErrCode err = NoError;
switch (elemType-&amp;gt;notifID) {
case APINotifyElement_Delete:

//  I hope Cancel Delete Command By Guid

break;
default:
err = APIERR_NOTSUPPORTED;
break;
};//sw
return(err);

}

//-------------------------------------

void SetHandler() {

//Get Guid List

...





//Set Handle for Delete Command

ACAPI_Notify_InstallElementObserver(ElementEventHandler);

for (auto&amp;amp; guid: GuidList) {
  err = ACAPI_Element_AttachObserver(guid);
}

}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2022 15:50:00 GMT</pubDate>
    <dc:creator>Kouichi</dc:creator>
    <dc:date>2022-05-17T15:50:00Z</dc:date>
    <item>
      <title>How To Hook And Cancel When Delete Element</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Hook-And-Cancel-When-Delete-Element/m-p/338596#M1480</link>
      <description>&lt;P&gt;Please Teach me.&lt;/P&gt;
&lt;P&gt;How To Hook And Cancel When Delete Element.&lt;/P&gt;
&lt;P&gt;I catch DELETE Handler&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;static GSErrCode __ACENV_CALL ElementEventHandler(const API_NotifyElementType *elemType) {
GSErrCode err = NoError;
switch (elemType-&amp;gt;notifID) {
case APINotifyElement_Delete:

//  I hope Cancel Delete Command By Guid

break;
default:
err = APIERR_NOTSUPPORTED;
break;
};//sw
return(err);

}

//-------------------------------------

void SetHandler() {

//Get Guid List

...





//Set Handle for Delete Command

ACAPI_Notify_InstallElementObserver(ElementEventHandler);

for (auto&amp;amp; guid: GuidList) {
  err = ACAPI_Element_AttachObserver(guid);
}

}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 15:50:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Hook-And-Cancel-When-Delete-Element/m-p/338596#M1480</guid>
      <dc:creator>Kouichi</dc:creator>
      <dc:date>2022-05-17T15:50:00Z</dc:date>
    </item>
  </channel>
</rss>

