DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: SampleWidth for FixedWidthChannelFormatter

Property: SampleWidth for FixedWidthChannelFormatter

Specifies how many consecutive values are read from a line in the text file for one channel. The default value for this property is 1.

Object.SampleWidth
ObjectFixedWidthChannelFormatter
Object with this property
Object.SampleWidthLongInteger with read and write access

The following example shows the settings required for reading the lines listed below:

0127+098-765+432
0000-876+543+210
-128+654-321

The SampleWidth property specifies that two consecutive values are read from a line for each channel:

Dim oBlock: Set oBlock = File.GetFixedWidthBlock
Dim oChannelGroup: Set oChannelGroup = Root.ChannelGroups.Add("Channelgroup")
          
Dim oChn1  : Set oChn1  = oBlock.Channels.Add("Channel1", eI32)
oChn1.Formatter.CharacterCount = 4
oChn1.Formatter.SampleWidth = 2
Call oChannelGroup.Channels.AddDirectAccessChannel(oChn1)

Dim oChn2  : Set oChn2  = oBlock.Channels.Add("Channel2", eI32)
oChn2.Formatter.CharacterCount = 4
oChn2.Formatter.SampleWidth = 2
Call oChannelGroup.Channels.AddDirectAccessChannel(oChn2)

oBlock.Position = File.Position
In This Section
Was this information helpful?