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
__int64 __declspec(dllexport) __stdcall engiGetEntityElement(
            __int64 model,
            __int64 index

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

Property model

Size: 64 bit / 8 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: 64 bit / 8 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(__int64 model)
    __int64 i = 0, cnt = engiGetEntityCount(model);
    while  (i < cnt) {
        char    * entityName = 0;
        __int64 ifcEntity = engiGetEntityElement(model, i);
        engiGetEntityName(ifcEntity, sdaiSTRING, &entityName);
        std::cout << "Entity  " << entityName << std::endl;