IModel.Take method
Namespace: NextDesign.Core
Description
Moves the specified model to the specified field of this instance. The parent element of the model to be moved is this instance. Note that no exception is thrown if the destination field's multiplicity upper bound constraint is violated.
argument
Name | Type | Description |
---|---|---|
fieldName | string | Field name Null or an empty string cannot be specified. |
target | IModel | Model to move Null cannot be specified. |
direction | string | Addition direction at the destination -"first": First -"last": Last -"before": Before -"after": After |
index | int | Additional reference position Specify the index with the start position as 0. If the direction is specified as "first", it will move to the beginning regardless of the index value. If the direction is specified as "last", it will be moved to the end regardless of the index value. If the direction specification is "before", the instance is moved to the specified position, and if it is "after", the instance is moved to the position next to the specified position. |
Return value
- void
Exception
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null is specified for target When null or an empty string is specified for fieldName When a character string other than the default character string is specified for direction |
Field not found | ExtensionFieldNotFoundException | If the specified field is not found in the metaclass of this instance |
Invalid index range | ExtensionOutOfRangeException | When a negative number is specified for index or when a value greater than or equal to the number of elements in the corresponding field is specified for index |
Specified field invalid | ExtensionInvalidTypeException | If the specified field is not a owned field or the data type of the specified field is incompatible with the metaclass of the instance to which it is moved |
Illegal operation | ExtensionInvalidOperationException | If it is a deleted model or a temporary proxy If an inoperable field is specified in the field name -Product line feature assignment field -System Fields with .Core tags |
Circular reference | ExtensionCircularReferenceException | When target is the call target of this method or its ancestors |
Invalid model specified | ExtensionInvalidModelException | When the following model is specified as the moving model -Deleted model -Temporary proxy -Project -Unit A model that is the starting point in and has no parent element loaded |