DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Message box

Solved!
Go to solution

Hi,

I hope someone can give me a hand with this....

 

I have created an array of offset where each position of the array corresponds to the offset for a channel. I have another array with the channels names.

Now I would like a window to pop showing the name of the channel on the left and its offset on the right (there are 36 offsets) so the user can check them.

 

So far I have created a For loop that pops a message box (using the "msgboxdisp" function) with one value at the time, 36 times, which to be honest is a extremely poor solution.

 

Can someone propose something

 

Thanks 

0 Kudos
Message 1 of 6
(6,585 Views)

Hi Leillo

 

Can you share your step or code so far?

Can you not build a string, concatenating one value each loop and then display the final string?

 

 

Kind regards

 

Chris | Applications Engineer NIUK
0 Kudos
Message 2 of 6
(6,568 Views)
For iCount= 1 to 23 StatSel(iCount)="no" Next StatSel(6)="yes" Dim offset(100)'Define an array of 100 for the channel offsets Dim a, i a= ChnNoMax'Calculates the number of channels For iCount=1 to a 'Loop to calculate the array of offsets Call StatBlockCalc("Channel","1-",iCount)'Calculation done channelwise, front the 1st row to the last one, every channel (iCount represents 'all the channels. offset(iCount)=statarithmean 'array of offsets Next for i=1 to a call msgboxdisp(offset(i),"MB_OK", "MsgTypeWarning",, 3) Next

Hi Chris,

 

This is the code so far, at the moment I am poping a message for every value in offset that lasts for 3 seconds.

Apart from this, there is an array of names.

I would like to create a single message box with "a" lines (as many lines as values to display) having in each line a name from the array called "names" and the corresponding value from the array called "offset" 

 

Thanks

0 Kudos
Message 3 of 6
(6,559 Views)

Hi Leillo

 

I've not used DIAdem extensively, however if you go to Script and then 'Dialog Box Templates' and then 'Dialog Box for Table Entires' it opens up the DIAdem Dialog Editor.

I imagine you might be able to address each cell in the table and write it out in your loop?

 

Kind regards

Chris | Applications Engineer NIUK
0 Kudos
Message 4 of 6
(6,536 Views)
Solution
Accepted by Leillo

Hi Leillo,

 

Here's the quick-and-dirty MsgBox approach.

 

For iCount= 1 to 23
  StatSel(iCount)="no"
Next
StatSel(6)="yes"
Dim offset(100)'Define an array of 100 for the channel offsets
Dim a, i, Msg
a= ChnNoMax'Calculates the number of channels
For iCount=1 to a 'Loop to calculate the array of offsets
  Call StatBlockCalc("Channel","1-",iCount)'Calculation done channelwise, front the 1st row to the last one, every channel (iCount represents 'all the channels. 
  offset(iCount)=statarithmean 'array of offsets
Next
for i=1 to a
  Msg = Msg & i & vbTAB & offset(i) & vbCRLF
Next
call msgboxdisp(Msg,"MB_OK", "MsgTypeWarning",, 3)

 

The MsgBox won't be able to show all 100 elements, but you could filter out just the problem/interesting elements and hide the uninteresting ones.  Or you could go the SUDialog route to pop up a custom dialog you define to have a table with 2 columns.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 6
(6,527 Views)

Hi,

Thank you. This is close enough to what I had in mind.

Leo

0 Kudos
Message 6 of 6
(6,500 Views)