DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Box as log window

Hello,
 
I would like to make an Editbox as a log window where you can see the state of data analysis in DIAdem 10.2. My problem is: When I start the program and the window appears, code execution stops. If I close the window, code execution will be continued.
 
How is it possible don´t stop code execution? And, if it is possible how can I list all status messages one below the other in one window? Is the SUDDlgShow command the solution?
 
Regards,
Marcel
 
 
0 Kudos
Message 1 of 5
(4,199 Views)

Hello Marcel,

I don't know if I understand you correctly.
Some things to make it clear:

1. Where is (should be) the Editbox? In the SUD-Dialog?
2. "...start the program...." means a VBS-script?
3. "...the window appears..." means the dialog with the editbox?

A SUD-call from a script stops always the code execution (i think), cause it waits for a user interaction.
So I see three ways:

a) use the MsgLineDisp
b) use a nonmodal Messagebox like this: call MsgBoxDisp(text & VBcrlf & "Bitte warten...","MB_NOBUTTON","MsgTypeNote",,,"YES")
c) your analysis-code has to be in the SUD-dialog, so the code is running while showing and changing the dialog

Hope, that helps.

 

greets Andreas

Volkswagen AG
Wolfsburg - Germany
0 Kudos
Message 2 of 5
(4,191 Views)

Hello Andreas,

sorry for my bad explanation, but you understood it correctly. I have to decide which solution I will take. I tried out your three points, but with your last one I have following problem: The output text isn´t shown line by line. Editbox displays only the last text. So, is it possible not to overwrite the text every time?

In addition, a function call didn´t work. I copied my main program and appropriate functions in Dialog_EventInitialize() but a syntax error occured, e. g. "Function MaxHub(ByVal dblMaxSperrweg, ByVal dblZahnlaenge, ByVal intSchrittweite)".  Differ the function syntax in this case?

Perhaps these questions are very easy to answer for you, but I have less knowledge of VBS and DIAdem.

Thank you for your help.

greetings,

Marcel

 

0 Kudos
Message 3 of 5
(4,187 Views)
Hello Marcel!
 
I recommend to use a listbox for the message output. You can add a line and set the selection to this line. Try this:
Call ListBox1.Items.Add(CStr(now),ListBox1.Items.Count+1)
ListBox1.Value = ListBox1.Items.Count
 
You shouldn't use the Initialize event for something like this. This event is fired before the dialog is visible! Unfortunately the standard DIAdem has no 'OnShow' for SUD dialogs. The easiest way is to add a button and the user must click this. If you have one you can use a timer control instead.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 4 of 5
(4,184 Views)

Goju,

Note that in DIAdem 11.0, which is now in Beta1, non-modal SUDialogs are finally available-- this would allow your "logfile" display to persist independently of the VBScript running or even after it has ended.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 5
(4,165 Views)