sdaiIsSubtypeOfBN
Determines whether a specified instance type is a subtype of another specified instance type. This operation will return sdaiTRUE if the instance type specified by the <subtypeEntity> argument is the same or a subtype of the instance type specified by the <supertypeEntity> argument, else sdaiFALSE will be returned.
The dictionary model that holds the actual entity definition instances must be open before this operation can be successfully performed.
Related function: sdaiIsSubtypeOf
Header:
#include "sdai.h"
Prototype:
SdaiBoolean sdaiIsSubtypeOfBN(SdaiString schemaName,
SdaiString subtypeEntity,
SdaiString supertypeEntity);
Arguments:
schemaName |
The name of the EXPRESS schema that defines the actual entities, i.e. the actual instance types. This EXPRESS schema must exist as a dictionary model in the EDMdatabase. Schema names are case insensitive. |
subtypeEntity |
The name of an entity defined in the EXPRESS schema defined by the <schemaName> argument. The <schemaName> and this entity name uniquely identify the entity definition instance in the EDMdatabase that defines the subtype in this operation. Entity names are case insensitive. |
supertypeEntity |
The name of an entity defined in the EXPRESS schema defined by the <schemaName> argument. The <schemaName> and this entity name uniquely identity the entity definition instance in the EDMdatabase that defines the supertype in this operation. Entity names are case insensitive. |
Returns:
sdaiTRUE : The <subtypeEntity> instance type is the same or a subtype of the <supertypeEntity> instance type.
sdaiFALSE : The <subtypeEntity> is neither the same instance type nor a subtype of the <supertypeEntity> instance type. Use sdaiErrorQuery to check for error during operation.
Example:
...
if (sdaiIsSubtypeOfBN("PDM_Schema", "Curve", "Point") == sdaiTRUE) {
. . .
}
. . .