Copy Instance

Makes a copy of an instance, i.e. creates new instance(s) in a target model. The actual copy process can be a shallow or a deep copy. The result instance(s) can be located in the same data model as the source instance or in another data model.
This command is only applicable to application instances.
Arguments:

InstanceID or query?

One of two arguments are accepted:
instanceID: The instance to copy will be specified by its instanceID number.
query: The instance to copy will be specified by a query.

InstanceId:

Specify an unsigned integer value denoting the EDMdatabase unique instanceID of the instance to be copied. This argument is only effective when the <instanceID or query?> argument is set to instanceID.

Repository:

Specify the name of the repository holding the instance to be copied. This argument is only effective when the <instanceID or query?> argument is set to query. Repository names are case sensitive.
When activating the Select button, the name of all open repositories will be displayed in the related selection list.

Model:

Specify the name of the model that holds the instance to be copied. This argument is only effective when the argument <instanceID or query?> is set to query. This model must be open for read access to enable a successful execution of this command. Model names are case sensitive.
When activating the Select button, the name of all open models located in the repository(ies) specified by the <Repository> argument will be displayed in the related selection list.

Entity:

Specify the name of the entity, i.e. the type of the instance to be copied. This argument is only effective when the <instanceID or query?> argument is set to query. Entity names are case insensitive.
When activating the Select button, the name of all existing instance types in the model(s) specified by the arguments <Repository> and <Model> will be displayed in the related selection list.

First instance index to check:

Specify an integer value denoting the index, i.e., element number in the Entity Extent aggregate that holds all instances of the same type in a model. The value of the <First instance index to check> argument specifies the index of the first instance to query The instance type is specified by the <Entity> argument. The first instance in the entity extent aggregate has index zero. This argument is only effective when the <instanceID or query?> argument is set to query.
This argument will be automatically updated to the index of the last instance that matched the query plus one, when the option [update indexes] is set. This feature makes it convenient to query all instances of a particular type in several consecutive queries.

Condition:

Specify the query to identify the actual instance. An empty query, i.e., a blank in the <Condition> argument will match all queried instances. This argument is only effective when the <instanceID or query?> argument is set to query.
See condition for syntax of this argument.

Target Model Repository:

Specify the name of a repository where the target model resides. Repository names are case sensitive.
When activating the Select button, the name of all open repositories will be displayed in the related selection list.

Target Model:

Specify the name of the model within the repository given by the <Target Model Repository> argument that will hold a copy of the instance. The <Target model> name must be unique within the <Target model repository>.
The model name must start with a letter and the rest of the model name can be any mix of alphanumeric characters and the underscore character. Model names are case sensitive.
The model hosting the source instance and the target model must both be populations of the same Express schema.
When activating the Select button, the name of all models located in the repository specified in the <Target Model Repository> will be displayed in the related selection list.

Include/Exclude types:

Specify the name of the type of the instance to be included/excluded in the copying process. Entity type names are case insensitive. The option [include types] or [exclude types] specifies whether the types should be included or excluded in the copying process.
Included in the copying process means that in addition to the target instance, only instances of the types that are listed in the <Include/Exclude types> argument will be copied. Optionally also subtypes of the listed types in the <Include/Exclude types> argument will be copied.
Excluded in the copying process means that no instances of the types listed in the <Include/Exclude types> argument will be copied. Optionally no subtype instances of the types listed in the <Include/Exclude types> argument will be copied.
When the <Include/Exclude types> argument is blank and the [include types] option is not enabled, the operation will be a full unconditional deep copy.
When the <Include/Exclude types> argument is blank and the [include types] option is enabled, the operation will be a shallow copy, i.e., only one target instance will be copied and no relations to other instances in the target instance will be set.
When activating the Select button, the name of all existing instance types in the model(s) specified by the arguments <Repository> and <Model> will be displayed in the related selection list.

Options:

accumulating command output:

A global option that appends the command output to the EDMsupervisor output window. Otherwise the output window is refreshed and only the last command output is displayed.

match selected input:

A global option that specifies that only items that partly or exactly matches the string in the related argument input field when activating a Select button, will be in the selection list. An empty (blank) string will match all items.

update indexes

A global option that specifies that the <First instance to check> argument will be updated to the next index after the one currently displayed.

include types

Only instances of the type specified in the <Include/Exclude types> argument will be copied. When the [subtypes] options is set, additionally instances that are subtypes of the specified types in <Include/Exclude types> argument can be copied.
The option values <include types> and <exclude types> are mutually exclusive.

exclude types

Instances of type specified in the <Include/Exclude types> argument will not be copied. When the [subtypes] options is set, additionally instances that are subtypes of the specified types in <Include/Exclude types> argument will not be copied.
The option values <include types> and <exclude types> are mutually exclusive.

subtypes

This option has only effect when used together with <include types> or <exclude types> options.