Make an EZ-Builder Behavior Control

EZ-Script Variables

The EZ-Builder variable manager stores and retrieves global variables that are available within EZ-Builder plugins and controls. This allows you to Set and Get variables that other controls may be configuring or using.

Data Types
The EZ-Script variable stores dynamic data types. This means that there is no declaration between numeric or string values. For example in EZ-Script you would type...


$a = 3
$b = 3.123
$c = "This is a string"
$d = 0x055

And in C# plugin you would type...


EZ_Builder.Scripting.VariableManager.SetVariable("$a", 3);
EZ_Builder.Scripting.VariableManager.SetVariable("$b", 3.123);
EZ_Builder.Scripting.VariableManager.SetVariable("$c", "This is a string");
EZ_Builder.Scripting.VariableManager.SetVariable("$d", 0x055);

Single Variables
EZ_Builder.Scripting.VariableManager.ClearVariable(string variableName)
Clear the variable and remove it from memory.

Clear the entire variable memory.

EZ_Builder.Scripting.VariableManager.DoesVariableExist(string variableName)
Returns a Boolean if the variable has been defined in memory.

Returns a string with each variable and the corresponding value (one per line). This is similar to the Variable Manager control found in EZ-Builder->Add Control->Scripting->Variable Manager.

EZ_Builder.Scripting.VariableManager.GetVariable(string variableName)
Get the value stored in the specified variable.

EZ_Builder.Scripting.VariableManager.GetVariable(string variableName, int index)
Get the value stored in the specified index of the array variable.

EZ_Builder.Scripting.VariableManager.SetVariable(string variableName, object value)
Set the value into the memory location of the specified variable. If the variable does not exist, this will create the variable and assign the value.

Array Variables
EZ_Builder.Scripting.VariableManager.AppendToVariableArray(string variableName, object value)
Append the value to the existing array.

EZ_Builder.Scripting.VariableManager.CreateVariableArray(string variableName, byte[] values)
EZ_Builder.Scripting.VariableManager.CreateVariableArray(string variableName, string[] values)
EZ_Builder.Scripting.VariableManager.CreateVariableArray(string variableName, object defaultValue, int size)
Create an array variable and specify the default values. Use AppendToVariableArray() to add more items to this array.

EZ_Builder.Scripting.VariableManager.FillVariableArray(string variableName, object defaultValue)
If a variable array already exists, this will fill every defined index of the array with the specified value.

EZ_Builder.Scripting.VariableManager.GetArraySize(string variableName)
Returns an integer that is the index size of the specified array variable.

EZ_Builder.Scripting.VariableManager.IsVariableArray(string variableName)
Returns a Boolean if the specified variable is an array.

EZ_Builder.Scripting.VariableManager.SetVariable(string variableName, object value, int index)
Set the value into the index of the specified array variable. The array size must already be defined. If you attempt to set a value to an index outside of the index size, an exception will be thrown.

United Kingdom
Trying to follow the tutorials but can't find where the plugin page has gone. How do I add a new plugin to the ez-robot / Synthiam site to get the XML?
United Kingdom
Never mind. Just found the "Create Behaviour Control" link:)
I am trying to follow the instructions for adding my own plugin but I cannot seem to find the place to register the plugin based on the instructions.

Any help is appreciated.

#8   — Edited
The new button to create a plugin behavior control is less than an inch below the button you pressed to create this question. :)

User-inserted image
Thanks for the quick response.

This what happens when you are working on robotics when its way past your bed time.

You miss the obvious