Skip to main content

IModelCopyService.CanPaste Method

Namespace: NextDesign.Core.Runtime

Description

Checks whether a copied model in the specified project can be pasted to the specified model location.
If any of the following conditions are met, the function determines that pasting is not possible and returns false.

  • The specified base model for the paste destination does not exist in the specified project.
  • The metamodel structure of the base model for the paste destination does not support pasting (for example, the corresponding class type field does not exist).

Argument

NameTypeDescription
projectIProjectProject
contextICopyContextCopy context
pasteTargetIModelBase model for the paste destination

Return value

  • bool

Exception

NameException classDescription
Invalid argumentExtensionArgumentExceptionIf null is specified for project
If null is specified for context
If null is specified for pasteTarget
Invalid operationExtensionInvalidOperationExceptionIf project If a closed project is specified
UnsupportedExtensionNotSupportedExceptionIf the current edition of the application is not compatible