edmiRemoteDefineComplexEntity


 

EdmiError edmiRemoteDefineComplexEntity(SdaiServerContext serverContextId,
                                          SdaiModel         modelId,
                                          SdaiString        complexName,
                                          SdaiEntity        *entityId,
                                          SdaiInvocationId  *edmiInvocationId);


Complex entities are not automatically generated when compiling an Express Schema. Even though ISO10303 specifies otherwise, complex entities can only be created on explicit requests or implicitly within calls to some EDMinterface  functions. The reasons for this are performance optimization and a desire for reduction of the required space for EDMdatabases  This function enables definition of specific instantiable complex entities in a dictionary model. See ISO 10303-11: The Express language reference manual; for a description of complex entities.
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 of the Express Schema. This means that an entity definition instance for 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 is not found in the belonging dictionary model, an entity extent aggregate will be generated for the complex entity within the specified data model only.

When the <modelId> argument is a data model and the specified complex entity is not found in the appropriate dictionary model, both 1) and 2) will happen.

Arguments


TypeNameComment
 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

 SdaiModel

modelId

A numeric modelID that uniquely identifies the data model or the dictionary model of interest in the remote  EDMdatabase

 SdaiString

complexName

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' will be 'SUBTYPE1+SUBTYPE2'.

 SdaiEntity

entityId

A variable that will receive the numeric entityID that uniquely identifies the complex entity within the the remote EDMdatabase

 SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


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

 

Options


  

 

Example


 

 /*
 SCHEMA Relations 
 ENTITY Person; 
 PID : INTEGER; 
 Name : STRING; 
 END_ENTITY; 
  
 ENTITY Man SUBTYPE OF Person; 
 . . . 
 HasBeard : BOOLEAN; 
 . . . 
 END_ENTITY; 
  
 ENTITY Woman SUBTYPE OF Person; 
 . . . 
 HasGivenBirth : BOOLEAN; 
 . . . 
 END_ENTITY; 
 END_SCHEMA; 
 */
 EdmiError rstat;
 SdaiInteger nWrn, nErr;
 SdaiServerContext myContext;
 SdaiModel dictModelId;
 SdaiRepository repId;
 SdaiSchema schemaId;
 SdaiEntity Man_Woman_ComplexEID;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Compile the schema */
 rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,
 "c:/data/Relations.exp", "c:/tmp/Relations.dia",  
 "Relations", 0, &nWrn, &nErr, NULL); 
  
 /* Get the id of schema Relations */
 rstat = edmiRemoteGetSchema(myContext, "Relations",
 &schemaId, NULL); 
  
 /* Get the id of dictionary model */
 rstat = edmiRemoteGetInstanceModel(myContext,
 schemaId, &repId, &dictModelId, NULL); 
  
 /* Define a Man+Woman complex entity
 in the dictionary model */ 
 rstat = edmiRemoteDefineComplexEntity(myContext, dictModelId,
 "MAN+WOMAN", &Man_Woman_ComplexEID, NULL); 
 . . .

 

See also

Filter by label

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

Â