edmiDefineComplexEntity

EdmiError edmiDefineComplexEntity(SdaiModel  modelId,
                                   SdaiString complexName, 
                                   SdaiEntity *entityId); 

By default complex entities are not created during schema compilation in order to save space in the EDMdatabase and to enable optimal performance. This function defines specific complex entities in the actual dictionary model and enables the instantiation of complex entities in the appropriate data models. Creation of complex entities can optionally be done by the edmiCompileFile function. See ISO 10303-11: The Express language reference manual; for a description of complex entity. The required complex entities will implicitly be defined when invoking the EDMinterface functions sdaiCreateInstance, sdaiCreateInstanceBN, sdaiGetEntity, sdaiGetAttrDefinition, and sdaiGetAttrDefinitionBN, such that the execution of the edmiDefineComplexEntity function is not required. There are three possible consequences when activating this function:

  1. When the <modelId> argument is a dictionary model, the new complex entity will be defined as a valid entity type in the appropriate schema, i.e. in an entity definition instance that defines the complex entity will be created in the specified dictionary model.
  2. When the <modelId> argument is a data model and the specified complex entity exist in the appropriate dictionary model, an entity extent aggregate will be generated, i.e. the specified data model will be prepared to keep instances of the actual complex entity.
  3. When the <modelId> argument is a data model and the specified complex entity does not exist in the appropriate dictionary model, both 1) and 2) will happen.

When the model specified by the <modelId> argument is a data model, this data model must be open for write access before this function can be successfully performed. When the model specified by the <modelId> argument is a dictionary model, this dictionary model must be open before this function can be successfully performed

Arguments


TypeNameComment
SdaiModel

modelId

A numeric modelID that uniquely identifies the data model or the dictionary model of interest in the EDMdatabase. The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

SdaiString

complexName

Specifies the name of the complex entity. Complex entity names are case insensitive. A complex entity name is an alphabetically ordered concatenation of the names of all the constituents, i.e., the subtype entities that defines the complex entity. A '+' character must be used to concatenate the names. Example: The complex entity name involving the entities 'SUBTYPE1' and 'SUBTYPE2' shall be of the form 'SUBTYPE1+SUBTYPE2'.

SdaiEntityentityId 

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

 

Example


 

 EdmiError rstat;
 SdaiModel modelId;
 SdaiEntity entityId;
 ...
 if (rstat = edmiDefineComplexEntity(
 modelId, 
 "MASS_MEASURE_WITH_UNIT+MEASURE_REPRESENTATION_ITEM", 
 &entityId)) { 
 /* Error in operation */ 
 printf("\nError in edmiDefineComplexEntity: %s\n", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 . . . 

 

See also

Filter by label

There are no items with the selected labels at this time.

Â