Modules

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Variable Definitions and Operations > MOD. - Modules >

Modules

MOD.Copy Var

Previous Top Next


MiniRobotLanguage (MRL)

 

MOD.Copy Var

Copy variables together with their type and content from a specified Module to a specified Module.

 

 

Intention

 

You can use this command to copy one or multiple variables from any specified module in P1, to any specified module in P2.

All the variables are copied together with their type and content, to the destination Module-Space.

It does not matter in which Module-Space you currently are.

 

All copied variables will still be available in the module where they are now and they will exist in the Module specified in P2 as a Copy.

If there is a variable with this name already in the destination Module-Space, that Variable will be deleted/overwritten - see Sample below.

 

Note that MOD.Copy Var is generally slower than MOD.Move Var.

As MOD.Move Var will move the complete variable like a rename operation while MOD.Copy Var will indeed Create a new Variable with the complete data in the target module space.

 

 

Syntax

 

 

MOD.Copy Var|P1|P2|P3

 

 

Parameter Explanation

 

P1 - Is the name or number of a Module from where to copy the Variables in P3 to.

P2 - Is the name or number of a Module where to copy the Variables in P3 to.

P3 - List with Variables that shall be copied to the P3 Module. There is no hard coded limitation on the number of Variables in that list.

       
        MOD.Copy Var|$$SRC|$$DES|$$VAA,$$VAB,$$VAC

 

 

clip0990

Here you can see some Speed Samples from the Script below.

 

 

 

Example

 

'***********************************

' MOD.Copy to - Sample

'***********************************

MOD.New|Layer 1

$$TXT=Bin in L1

MOD.New|Layer 2

$$TXT=Bin in L2

MOD.New|Layer 3

$$TXT=Bin in L3

MOD.Main

$$TXT=Bin in Main

MOD.Copy Var|Layer 1|Layer 2|$$TXT

DMP.gv

DMP.Sp

MBX.!

ENR.

 

clip0989

We have overwritten the Value of the Layer 2 - Module with the Value from Layer 1 Module here.

 
 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: