Reading zenon bool in vsta

Reading zenon bool in vsta

Hello.
I would like to know, how i can read and write zenon variable(bool) in vsta.
Now i am reading by:
for (int y = 0; y <6; y++)
{
arraystring[y] = this.Variables().Item("Palet1_bool[" + y+"]").get_Value(0).ToString();
arraybool[y] = Convert.ToBoolean(arraystring[y]);
}
and writing by:
this.Variables().Item("Palet1_int["+ a +"]").set_Value(0, arrayint[a]);
for example int i read without problems, but bool i cant read.
thank you

This is a migrated post! Originally posted on 22.03.2016 by user DavidMarek. Please be aware that information can be outdated.