09-17-2013 04:53 PM
I have a problem using the ChnPropValGet command in a dialog box.
The code works with no problems with only 1 data file loaded but when I load additional files the routine returns the wrong data. I have built the code of the "weather example" supplied. Using "msgbox's I have checked that the channel name is correct but the data is still linked to other groups of data. Irronically the column headers work fine.
Any help would be much appreciated
Example of the code is shown below.
Thanks
David
' Read out and display channel values
If (Col > 0) And (Col <= Columns) Then
If (Row <= ChnPropValGet(GroupPath & "/[" & str(Col) & "]", "length")) Then
'msgbox iCurrEditableRow & " "&XTable1.ActiveCellRow & " " & GroupPath & ChnPropValGet(GroupPath & "/[" & str(Col) & "]", "length")
Cell.Text =
cht(Row, Col)
'msgbox iCurrEditableRow & " "&XTable1.ActiveCellRow & " " & GroupPath & ChnPropValGet(GroupPath & "/[" & str(Col) & "]", "length") & Cell.Text
Cell.BackColor = dShowColor
' Define headings
If Row = 0Then
' No heading for first cell
If Col = 0Then Cell.Text = ""
' Channel name is heading
If (Col > 0) And (Col <= Columns) Then
Cell.Text =
ChnPropValGet(GroupPath & "/[" & str(Col) & "]", "name")
EndIf
EndIf
09-17-2013 07:20 PM
I found the problem
David
09-18-2013 02:17 PM
Hi David,
For common properties like these I still use the old DIAdem 8.x variables:
ChnName(Channel)
ChnLength(Channel)
ChnComment(Channel)
ChnDim(Channel)
ChnFormat(Channel)
Brad Turpin
DIAdem Product Support Engineer
National Instruments