xpfCopyModelBN
FUNCTION xpfCopyModelBN (sourceNodelRepositoryName : STRING; sourceModelName : STRING; targetModelRepositoryName : STRING; targetModelName : STRING) targetModlId : GENERIC;
The xpfCopyModel function makes a copy of a model, i.e. creates a new model and copies all instances in the source model, specified by the argument <sourceModelId> to the new model (target model), specified by the attributes <targetModelRepositoryId> and <targetModelName>. The function returns the <targetModelId> after the copy operation. This function is only applicable to 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 |
STRING | sourceNodelRepositoryName | comments |
STRING | sourceModelName | Â |
STRING | targetModelRepositoryName | Â |
STRING | targetModelName | Â |
Return Value
Â
Type | Name | Comment |
GENERIC | targetModlId | comments |
Options
Â
Example
FUNCTION createModel(sourceModelName: STRING) : GENERIC; LOCAL targetModelId : GENERIC; controlId : GENERIC; END_LOCAL; ON_ERROR_DO; xpxPrintf('\nError.'); xpxThrow; END_ON_ERROR_DO; targetModelId := xpfCopyModelBN('DataRepository', sourceModelName, 'DataRepository', 'NAME_OF_COPIED_MODEL'); xpxPrintf('\ntargetModelId : %lu',targetModelId); controlId := xpfGetModelBN('DataRepository','NAME_OF_COPIED_MODEL'); xpxPrintf('\ncontrolId : %lu',controlId); IF(controlId :<>: targetModelId) THEN xpxThrow; END_IF; RETURN(targetModelId); END_FUNCTION;
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â