sdaiIsKindOf

...

Syntax

public const string IFCEngineDLL = @"IFCEngine.dll";

[DllImport(IFCEngineDLL, EntryPoint = "sdaiIsKindOf")]
public static extern Int32 sdaiIsKindOf(Int32 instance, Int32 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 = IfcEngine.x86.sdaiGetInstanceType(instance);

    while  (entity !=  0  &&  entity != instanceEntity)
    {
        entity = IfcEngine.x86.engiGetEntityParent(entity);
    }

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

    return 0;
}