Function me::Move(runtimeId, parentid, pos)

me::Move

The procedure me::Move renames a runtime identifier. In addition, when the move changes the namespace of the runtime identifier all text within the runtime library referencing that runtime identifier will be adapted accordingly.

me::Move(
        runtimeId,  ! (input) an element
        parentid,   ! (input) an element
        pos         ! (input) integer
)

Arguments

runtimeId

An element in the set AllIdentifiers referencing a runtime identifier.

parentid

An element in the set AllIdentifiers referencing a runtime identifeir in the same runtime library.

pos

An integer position in the section. 1 is the first position, and 0 means “place at end”.

Return Value

Returns 1 if the move operation is successful, 0 otherwise. In the latter case error(s) have been raised. When runtimeId doesn’t reference a runtime identifier an error will be raised.

Note

The name change file is not supported for runtime libraries.

Example

Viewing a small runtime library with prefix frerl in the model explorer:

../../_images/runtimelib-setup.png

Let

  • ep_functionReferenceExampleRuntimeLib refer to the root of the runtime library, and

  • ep_functionReferenceExampleRuntimeProc refer to a procedure inside the library, then the code:

me::Move(
    runtimeId :  ep_functionReferenceExampleRuntimeProc,
    parentId  :  ep_functionReferenceExampleRuntimeLib ,
    pos       :  1);

moves the procedure to the front of the library, as shown below:

../../_images/runtimelib-after-move.png

Illustrating that a runtime library can be reorganized at runtime.

References

Generic references for model edit functions can be found on the index page