09-05-2013 03:21 AM
Hello,
I have a question in order to save information in the channel.
My script is:
for i = 0 to Gesamtanzahl-1
Call Data.Root.ChannelGroups.Add("Sport").Activate()
Call Data.Root.ChannelGroups("Sport").Channels.Add("Gerät",DataTypeChnString)
Data.Root.ChannelGroups("Sport").Channels("Gerät").Values(i+1) = split (Data.Root.ChannelGroups(i+1).Properties("Delimiters").Value, "_")
next
The program says that the DataType is unknown. I think it is the Datatype of the delimiters. How is it possible that the Datatype is unknown, there is a number with letters behind the "Delimiters"
Thank you very much in advance.
Mosquito
09-05-2013 03:58 AM
Hello Mosquito,
The command SPLIT creates an array. Data.Root.ChannelGroups("Sport").Channels("Gerät").Values(x) is a single value. An allocation doesn't match.
You need an array variable for the result of split and afterwards a loop to allocat it with the channel values. Alternativly you can use the command ArrayToChannel for this.
Greetings
Walter