This call returns a specific entity based on an index, the index needs to be 0 or higher but lower then the number of entities in the loaded schema.


//   Visual Studio for Windows
__int32 __declspec(dllexport) __stdcall engiGetEntityElement(
            __int32 model,
            __int32 index

//   Linux, OS-X and non-Visual Studio Windows solutions
int32_t engiGetEntityElement(
            int32_t model,
            int32_t index

Property model

Size: 32 bit / 4 byte (value)
Handle of the model containing the IFC file, this handle is needed in many other calls and given when the model is created.

Property index

Size: 32 bit / 4 byte (value)
Integer value equal or larger then 0 and smaller than given maximum length of array/list/aggregation used.


Here you can find code snippits that show how the API call engiGetEntityElement can be used.

void    WriteEntities(__int32 model)
    __int32 i = 0, cnt = engiGetEntityCount(model);
    while  (i < cnt) {
        char    * entityName = 0;
        __int32 ifcEntity = engiGetEntityElement(model, i);
        engiGetEntityName(ifcEntity, sdaiSTRING, &entityName);
        std::cout << "Entity  " << entityName << std::endl;