Archicad 28 C++ API
Loading...
Searching...
No Matches
API_NotifyElementType Struct Reference

Describes the element the notification is coming for, and the type of the notification. More...

#include <APIdefs_Callback.h>

Public Attributes

API_ElementDBEventID notifID
 The type of the notification.
 
API_Elem_Head elemHead
 Element reference.
 
API_DatabaseUnId databaseId
 Element database identifier.
 

Detailed Description

Describes the element the notification is coming for, and the type of the notification.

Remarks
This is the parameter of the APIElementEventHandlerProc callback function, identifying the element and the type of notification your add-on was called for. In order to receive the notifications of created elements you should install an APIElementEventHandlerProc with the ACAPI_Element_CatchNewElement function. To be notified on deleting or modifying a specified element, attach an observer to the element you are interested in with ACAPI_Element_AttachObserver with the appropriate flags. You should definitely not modify the project database during @ref APINotifyElement_Undo and APINotifyElement_Redo notifications. The Notification Manager section explains how the element related notifications are sent to the add-ons. Since each add-on can be notified twice during the same operation, the first call is marked with a -1 index value in the @ref APINotifyElement_BeginEvents notification. This helps you to distinguish the first and the second @ref APINotifyElement_BeginEvents (for example if you have to keep the data synchronized with an external database).