Additional Information
Here you can find an extract of an example of the second options described above. You have to declare all variables with
Dim operator.
P1 and
Pn variables should be assigned to the indexes of the section of the original channel you need to copy in a new channel.
Time and
Vibration are the two original channels,
TimeCopy and
VibrationCopy are the newly created channels.
Set oOldChns = Data.Root.ActiveChannelGroup.Channels
Set oNewChnTime = oNewChnGrp.Channels.Add("TimeCopy",DataTypeFloat64)
Set oNewChnVibr = oNewChnGrp.Channels.Add("VibrationCopy",DataTypeFloat64)
aMyArray = oOldChns("Time").GetValuesBlock(P1,Pn)
Call oNewChnTime.SetValuesBlock(aMyArray, 1, eValueBlockValueOverwrite)
aMyArray = oOldChns("Vibration").GetValuesBlock(P1,Pn)
Call oNewChnVibr.SetValuesBlock(aMyArray, 1, eValueBlockValueOverwrite)