Returns a numeric entityID that uniquely identifies an entity definition instance in the EDMdatabase. An entity name is unique within one dictionary model (Express schema). Hence the combination of <schemaName> and <entityName> identifies one particular entity definition in the EDMdatabase.
The actual dictionary model must be open before this function can be successfully performed.
If the specified <entityName> is the name of a legal complex entity that does not exist as an entity definition instance in the related dictionary model, an entity definition instance of the actual complex entity, will be created in the related dictionary model.
The returned entityID can be used to identify the actual entity in subsequent EDMinterface operations. The returned entityID will be a constant value throughout the lifetime of the actual entity definition instance in the EDMdatabase.
Related functions: edmiGetEntityInSchema , edmiGetSchema , sdaiGetEntity
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetEntityInSchemaBN(SdaiString schemaName,
SdaiString entityName);
SdaiEntity *entityId);
Arguments:
schemaName |
Specifies the name of the EXPRESS schema that defines the entity of interest. This schema must exist as a dictionary model in the EDMdatabase. Schema names are case insensitive. |
entityName |
Specifies the name of the entity of interest. Entity names are case insensitive. |
entityId |
Address of the variable that will receive the numeric entityID that uniquely identifies the entity definition instance of interest in the EDMdatabase. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiEntity entityId;
. . .
if (rstat = edmiGetEntityInSchemaBN("PDM_Schema",
"Document",
&entityId)) {
/* Error in operation */
printf("\nError: %s in edmiGetEntityInSchemaBN\n",
edmiGetErrorText(rstat));
goto error;
}
printf("\nentityId: %lu", entityId);
. . .