I get several error messages when creating more than one channel table and wanting to display the channel descriptions. Is there something wrong with the assignment of the description value to the header line? I attached a minimum example:
Option Explicit 'Forces the explicit declaration of all the variables in a script. Call Data.Root.Clear() Call DataFileLoad("C:\Program Files (x86)\National Instruments\DIAdem 2014\Examples\Data\Example_data.tdm") Call Report.NewLayout() Dim oMySheet, oMyTable, oMyColumn, oMyGrp, iCount, gCount For gCount = 1 To GroupCount Set oMyGrp = Data.Root.ChannelGroups(gCount) Set oMySheet = Report.Sheets.Add("Table" & gCount) Set oMyTable = oMySheet.Objects.Add(eReportObject2DTable,"Table" & gCount) oMyTable.Settings.Header.Title2 = "@@Data.Root.ChannelGroups(CurrGroupIdx).Channels(CurrChnNo).Properties("& Chr(34) &"description"& Chr(34) &").Value@@" oMyTable.Settings.Header.UseAutoFontSize = TRUE oMyTable.Position.ByBorder.Bottom = 5 oMyTable.Position.ByBorder.Top = 5 oMyTable.Position.ByBorder.Left = 5 oMyTable.Position.ByBorder.Right = 5 For iCount = 1 To oMyGrp.Channels.Count Set oMyColumn = oMyTable.Columns.Add(e2DTableColumnChannel) oMyColumn.Channel.Reference = oMyGrp.Channels(iCount).GetReference(eRefTypeIndexName) Next Next Call Report.Refresh()
As you will see, everything works fine for the first table, but errors are produced for all the following ones.
/Phex