Hi,
In ArchiCAD13 if I delete the Zone I am not getting correct information.
OSErr _ACENV_CALL ElementHandler(const API_NotifyElementType* elemType)
{
API_Element element,old_element;
OSErr err;
if(elemType->notifID == APINotifyElement_Delete)
{
memset(&element, 0, sizeof(API_Element));
element.header.typeID = elemType->elemHead.typeID;
element.header.guid = elemType->elemHead.guid;
err = ACAPI_Element_Get(&element);
if(err == noErr || err == APIERR_DELETED)
DBHandleNotification(&element, NOTIFY_DELETEELEM);
if(err == APIERR_DELETED)
{
memset(&old_element, 0, sizeof(API_Element));
err = ACAPI_Notify_GetParentElement(&old_element, NULL, o);
DBHandleNotification(&old_element, NOTIFY_DELETEELEM);
}
}
}
If I delete any object it is working fine.
If I delete zone I am getting
element.zone.catInd = 0
old_element.header.typeID = API_ZombieElemID (Not even getting API_ZoneID).
I find elemType->elemHead.guid is correct guid I am getting, elemType->elemHead.typeID I am getting API_ZoneID correctly.
Can any one help me please.