IModelDuplicateService.CanDuplicate Method
Namespace: NextDesign.Core.Runtime
Description
Checks whether the specified model can be duplicated in the specified project.
If any of the following conditions are met, the function returns false, indicating that duplication is not possible.
- The specified model is not managed by the specified project.
- The specified model is related.
- The specified model does not have a parent element (or the parent element has not been loaded).
- Duplication would result in a multiplicity violation in the parent element of the specified model.
Argument
Name | Type | Description |
---|---|---|
project | IProject | Project |
model | IModel | Model to be duplicated |
Return value
- bool
Exception
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If null is specified for project If null is specified for model |
Invalid operation | ExtensionInvalidOperationException | If project is a closed project. is specified |
Not supported | ExtensionNotSupportedException | If the current edition of the application is not compatible |