IModelDuplicateService.Duplicate Method
Namespace: NextDesign.Core.Runtime
Description
Duplicates the specified model in the specified project.
The duplicated model is placed as a sibling of the specified model.
Duplicating applies to all child elements of the specified model, as well as relationships between those models and reference relationships that refer to the duplicated model.
Argument
Name | Type | Description |
---|---|---|
project | IProject | Project |
model | IModel | Model to duplicate |
duplicateName | string | Name of the duplicated model (optional) If omitted, "${Model name to duplicate} - Duplicate" will be used. |
Return value
Exceptions
Name | Exception Class | Description |
---|---|---|
Invalid Argument | ExtensionArgumentException | When project is specified as null When model is specified as null |
Invalid Operation | ExtensionInvalidOperationException | When a closed project is specified as project When the duplication process cannot be performed Example: When the parent model of the duplicated model is read-only When the model to be duplicated is an interaction element model |
Not Supported | ExtensionNotSupportedException | When the current edition of the application is not supported |