sdaiIsKindOf

...

Syntax

//   Visual Studio for Windows
public:
__int32 __declspec(dllexport) __stdcall sdaiIsKindOf(
            __int32 instance,
            __int32 entity
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int32_t sdaiIsKindOf(
            int32_t instance,
            int32_t entity
        );    

Property instance

Size: 32 bit / 4 byte (value)
Handle of an instance within an IFC file, for example #31313 = IFCWALLSTANDARDCASE(...)

Property entity

Size: 32 bit / 4 byte (value)
Handle of an entity (schema item/class), for example IFCWALLSTANDARDCASE as defined in IFC4.exp.

Examples

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

__int32 localIsKindOf(__int32 instance, __int32 entity)
{
    //
    //  This function is an alternative to the API call sdaiIsKindOf()
    //  based on sdaiGetInstanceType() and engiGetEntityParent().
    //
    //  Use of sdaiCreateAggr() can lead to performance improvement compared to sdaiCreateAggrBN().
    //
    __int32 instanceEntity = sdaiGetInstanceType(instance);

    while  (entity  &&  entity != instanceEntity) {
        entity = engiGetEntityParent(entity);
    }

    if (entity == instanceEntity) {
        return  1;
    }

    return  0;
}