2023-03-02 09:46 AM
Hi, in this (ChangeDefaultsHandler) example here:
https://archicadapi.graphisoft.com/documentation/acapi_notify_catchchangedefaults
what is (GetElementTypeString) refrencing to? does this function exist anymore?
2023-03-03 03:20 PM - edited 2023-03-03 03:20 PM
Hi,
From the name and signature it seems to give a string corresponding to the element type. So e.g. Giving it "API_DoorID" would return a string similar to: "Door".
Indeed you can find an implementation in the "Notification_Manager" example in the SDK.
Here is the code from the AC26 SDK:
bool GetElementTypeString (const API_ElemType& type, char *elemStr)
{
GS::UniString ustr;
GSErrCode err = ACAPI_Goodies_GetElemTypeName (type, ustr);
if (err == NoError) {
CHTruncate (ustr.ToCStr (), elemStr, ELEMSTR_LEN - 1);
return true;
}
return false;
}