DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling A Single Value From A Channel To Output To A Table Need Help

Solved!
Go to solution

Hey Brad, Nate -

 

Brad, your code references the selection of channels and groups in the Data Portal.  I may be confusing this with prior posts, but I'm pretty sure Nate is attempting to figure out which channels a user has selected in a Listbox within a SUD nested in VIEW. 

 

Nate, which are you trying to do?

 

If the latter, you'll need to adjust Brad's code accordingly.

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 11 of 15
(1,482 Views)

Im attempting the latter, like you are specifying Derrick. Also in Brads code, if Im not mistaken:

 

Length = Channel.Properties("Length").Value

 

Wouldn't this just return the length of the channel (i.e. There are 15000 cells in this channel)? Im looking for the specific value in the cell location not where the cell location is at (i.e. What is the value located @ cell 15000).

 

Thanks,

 

~Nate

0 Kudos
Message 12 of 15
(1,479 Views)
Length = Channel.Properties("Length").Value

LastValue = Channel.Values(Length)

 

Message 13 of 15
(1,471 Views)

Brad,

 

You're methodology should work the only issue I am having is that I am making my selections from a listbox that then references the Internal Data Portal and I cannot seem to do the following because the value is not an object:

 

Set Selection = selectData.MultiSelection(j).Index

 

Is there a work around for this?

 

Thanks,

 

~Nate

0 Kudos
Message 14 of 15
(1,463 Views)
Solution
Accepted by topic author Nate102

Ok so I figured out a work around that is a bit tedious but it does exactly what I want it to do so I'm happy for the time being.

 

1.) ChnAlloc new Channel with a single value.

2.) Call DataBlClpCopy("'" & selectData.MultiSelection(j).Text & "/**bleep** Fuel Used", 15018, 1)

3.) Call DataBlClpPaste("'" & selectData.MultiSelection(j).Text & "/Total Fuel Used", 1, 1)

4.) Call View.Sheets("Total Table").Areas("Area : " & Counter).DisplayObj.Columns.Add("Total Fuel Used")

 

And viola channel outputs to total table with just a single value and all channel properties

 

Thanks for your help guys,

 

~Nate

0 Kudos
Message 15 of 15
(1,451 Views)