Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Renames the specified data model in the EDMdatabase.
This function is only applicable to data models. Only the owner of a model can rename it.
Related function: edmiRenameModelBN .
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRenameModel(SdaiModel  model,
                           SdaiString newModelName); 
Arguments:

model

A numeric modelID that uniquely identifies the model in the EDMdatabase to rename.
The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

newModelName

Specifies the new name of the specified model. The model name must be unique within the repository that holds the model. The model name must start with a letter and the rest of the model name can be any mix of alphanumeric characters and the underscore character. Model names are case sensitive.

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;
SdaiModel model;
. . .
if (rstat = edmiRenameModel (model, "Building_AAXCD458C")) {
/* Error in operation */ 
printf("\nError: %s in edmiRenameModel \n", 
edmiGetErrorText(rstat)); 
goto error; 
}
. . .

  • No labels