edmiCopyModel
EdmiError edmiCopyModel(SdaiModel sourceModelId, SdaiRepository targetModelRepositoryId, SdaiString targetModelName, SdaiModel *targetModelId);
Makes a copy of a model, i.e. creates a new model and copies all instances in the source model to the new model (target model). This function is only applicable data models. The executing EDMuser must have read access to the source model. The source model will be unchanged by this operation. The source model can be open or closed when this function is executed. The new created target model will have the same underlying schema as the source model, i.e. the source and target model will be two different populations of the same Express schema
Â
Arguments
Type | Name | Comment |
SdaiModel | sourceModelId | A numeric modelID that uniquely identifies the data model in the EDMdatabase that will be the source model for the copy operation. |
SdaiRepository | targetModelRepositoryId | A numeric repositoryID that uniquely identifies a data repository in the EDMdatabase that will host the created target model. |
SdaiString | targetModelName | Specifies the name of the new target model that will be created by this operation. A model name must start with a letter and the rest of the model name can optionally be any mix of any alphanumeric character and the underscore character. Model names are case sensitive. A model name must be unique within the repository that holds the model. |
SdaiModel | targetModelId | An address to a variable that will receive a numeric modelID that uniquely identifies the created target model in the EDMdatabase. |
Return Value
Â
Options
 Â
Â
Example
Â
 EdmiError rstat; SdaiModel sourceModelId, targetModelId; SdaiRepository targetModelRepositoryId ... if (rstat = edmiCopyModel (sourceModelId, targetModelRepositoryId, "myNewModel", &targetModelId)) { /* Error in operation */ printf("\nError in edmiCopyModel: %s", edmiGetErrorText(rstat)); goto error; } ...
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â