DIAdem Help

Method: GetStringBlock for File

  • Updated2024-09-12
  • 1 minute(s) read

Method: GetStringBlock for File

Reads a text file and returns the channel values contained in the file.

Note  The file pointer of the text file does not move when a StringBlock is read.
Set oStringBlock = Object.GetStringBlock
ObjectFile
Object with this method
oStringBlockStringBlock
Returned object

The following example reads a text file that consists of one time channel and one real channel. The example then generates a channel group and inserts the two channels:

Dim oBlock : Set oBlock = File.GetStringBlock()
Dim oChn1  : Set oChn1 = oBlock.Channels.Add("Time", eTime)
Dim oChn2  : Set oChn2 = oBlock.Channels.Add("YShift", eR64)
Dim oMyGrp : Set oMyGrp = Root.ChannelGroups.Add("MyChannelGroup")
Call oMyGrp.Channels.AddDirectAccessChannel(oChn1)
Call oMyGrp.Channels.AddDirectAccessChannel(oChn2)

Log in to get a better experience