Hi,
I'm using DIAdem 2017. I have a TDM file containing 10 groups of data, each with a unique text name. After creating a new Group and Channel called "Results" and "Max Displacement", my script will loop through each group, do a calculation, and then store the value into the next row of the "Max Displacement" channel for a total of 10 rows when complete.
Under the "Results" group, I'd like to also create a second channel of text that captures the group name each time the script loops from group to group. However, I'm having trouble finding a command that will store text to a string channel.
Here is a simplified version of the script (using only 3 groups) and the error I am receiving. I'm guessing I need a different command other than "ChnGenVal" to add strings to each row of this channel, but I cannot seem to find something that will work.
'Create 3 generic groups
Call Data.Root.ChannelGroups.Add("Test A", 1).Activate()
Call Data.Root.ChannelGroups.Add("Test B", 2).Activate()
Call Data.Root.ChannelGroups.Add("Test C", 3).Activate()
'Create group called "Results" and channel called "Names"
Call Data.Root.ChannelGroups.Add("Results", 4).Activate()
Call Data.Root.ChannelGroups("Results").Channels.Add("Names",DataTypeString,1)
'Extract name of each group and assign to "Name" channel
Dim a,b
a = 1
Do While (a < 4)
b = Data.Root.ChannelGroups(a).Name
Call ChnGenVal("Results/Names",a,1,b,0,0)
a = a + 1
Loop