Archicad C++ API
About Archicad add-on development using the C++ API.

Get element's extended data

ReignBough
Enthusiast
  •  
  • You can get the element's default data by ACAPI_Element_GetDefaults and its default extended data by ACAPI_Element_GetDefaultsExt.
  •  
  • You can change the element's default data by ACAPI_Element_ChangeDefaults and its default extended data by ACAPI_Element_ChangeDefaultsExt
  •  
  • You can create an element by ACAPI_Element_Create and with extended data by ACAPI_Element_CreateExt
  •  
  • You can change the element's data by ACAPI_Element_Change and its extended data by ACAPI_Element_ChangeExt
  •  
  • You can get the element's data by ACAPI_Element_Get
How to I get the element's extended data? In my case, the detail marker extended data.

I created one using ACAPI_Element_CreateExt functions. The data I input was perfectly saved in the detail marker. But now I want to get it, I can't seem to find it since there is no corresponding ACAPI_Element_GetExt function for it. I've tried using/getting the parameters using:
owner.libInd = 0;
owner.typeID = iElemHead.typeID;
owner.index = iElemHead.index;
ACAPI_Goodies(APIAny_OpenParametersID, &owner)
...but it returns 0x81060068 (APIERR_BADPARS).

EDIT 1:
BTW, am I right that the "Ext" stands for "extended [data]".
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
1 REPLY 1
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
The element's extended datas are stored in elementmemos.
So ACAPI_Element_GetMemo function is what are you looking for.
API_Element			element; 
API_ElementMemo		memo; 
GSErrCode			err = NoError; 
 
// after you have the element's guid: 
err = ACAPI_Element_GetMemo (element.header.guid, &memo);
// extended data will be in memo structure