edmiRemoteNumberOfInstancesInModel

EdmiError edmiRemoteNumberOfInstancesInModel(SdaiServerContext serverContextId,
                                              SdaiString        remoteRepositoryName,
                                              SdaiString        remoteModelName,
                                              SdaiString        entityName,
                                              SdaiOptions       options,
                                              SdaiString        resultFile,
                                              SdaiInvocationId  *edmiInvocationId);

Returns the number of instances of a given instance type (entity) in an edmModel in a remote EDMdatabase.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

remoteRepositoryName

The name of the edmRepository in the remote  EDMdatabase that contains the edmModel of interest. Repository names are case sensitive.

SdaiString

remoteModelName

The name of the remote edmModel of interest. Model names are case sensitive. The combination of the <remoteRepositoryName> and <remoteModelName> arguments uniquely identifies an edmModel in a remote  EDMdatabase

SdaiString

entityName

The name of the entity. Entity names are case insensitive.

SdaiOptions

options

See description of available options below. Options may be joined by using bitwise OR operator

SdaiString

resultFile

The name of the file that will be written on the local file system when the option RESULT_IN_FILE is used.

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


  

NameComment

SUBTYPES

Also the instances of subtypes of the specified instance type <entityName> will be included in the count. Each subtype will not be listed individually.

ONLY_INSTANTIATED_ENTITIES

All instances of the subtypes of the specified instance type <entityName> will be counted separately. I.e, the count of each of them will be listed in an individual line in the output file.

INDIVIDUAL_SUBTYPES

Only subtypes of the instance type <entityName> that have been instanciated will be listed in the output file. This option has no effect unless combined with the option SUBTYPES.

TAB_SEPARATED_COLUMNS

The output file will have tab-separators inserted between the columns to make it easier to browse it in a spreadsheet application.

RESULT_IN_FILE

The resulting output from this function will be returned in the file given by the argument <resultFile> on the local file system.

 

Example


 

EdmiError rstat, error;
 SdaiInteger nWrn, nErr;
 SdaiServerContext myContext;
 SdaiOptions options;
  
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Read the population into the remote database */
 rstat = edmiRemoteReadStepFile(myContext,
 "OurRemoteRepository", "OurRemoteModel", 
 NULL, NULL, "c:/data/population.stp", 
 NULL, "OurExpressSchema", NULL, 0, 
 &nWrn, &nErr, &error, NULL); 
  
 /* Count the instances of OurEntity,
 and all its subtypes */ 
 options = INDIVIDUAL_SUBTYPES;
 options |= TAB_SEPARATED_COLUMNS;
 options |= ONLY_INSTANTIATED_ENTITIES;
 options |= RESULT_IN_FILE;
 rstat = edmiRemoteNumberOfInstancesInModel(myContext,
 "OurRemoteRepository", "OurRemoteModel", 
 "OurEntity", options, 
 "c:/data/output/population.count", NULL); 
 . . .

 

See also

Filter by label

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