DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

ChnPropValGet

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

0 Kudos
Message 1 of 3
(5,516 Views)

I found the problem

 

David

0 Kudos
Message 2 of 3
(5,509 Views)

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

0 Kudos
Message 3 of 3
(5,488 Views)