Defined Elsewhere

"Defined Elsewhere in Another Block" option:

Click to Enlarge; Click to Reduce.

Any variable "Defined Externally in Another Blox" Option

 

Almost all blox data variables are scoped to be entirely independent of other blocks.   This variable independence is created when a variable is created using the Scope setting Block.  Where this independence isn't true, is when a blox is created with a variable that is has a Scope setting of  System, Test, or Simulation.  These alternate scope option enable the data to be accessible outside of the block where it is created, and a different block uses the same variable name and then enables the "Defined Elsewhere in Another Block" option (see above image).  

 

The data in the variable using a Scope setting of System, Test or Simulation can be accessed by the block that has created a variable with the same name and enables "Defined Elsewhere in Another Block" option.

 

This data option item enables the "Defined Elsewhere in Another Block" definition option, only the type setting will be displayed in the blox where the data item is named.  Blox that have this option enabled must also have another blox in the same system that provides the named data item's scope setting and any default initialization value required.  

 

Data items that use the "Defined Elsewhere in Another Block" option, create a dependency that requires another blox to be in the system so the data item's information can be fully referenced for the test to operate successfully.

 

When the dependent blox isn't included, Trading Blox Builder will stop a test and display a message similar to this one at the bottom of the data window that appears:

"I can't run the '<Any Script Name>' script from the Trading Block '<AnyBloxName>'.  The parser can't understand line 1 because variable '<AnyVariableName>' is undefined in this context."

 

This message is reporting the "Defined Elsewhere in Another Block" data item hasn't been fully declared in any of the blox listed in the system being tested.

 

For more information about the "Defined Elsewhere in Another Block" option, review the information in the Data Scope topic.

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software