DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

how to load a text from a file to editbox?

Solved!
Go to solution

Hi,

 

I use a script from Diadem to load some data and make a report.. For that I load the data, and the report apeare, with a dialog box (ProtocolDlg2) were I can chose to edit the report variables, or print the report.

My question is how I can load in the editbox from the DialogBox(ProtocolDlg2), the variables ( in my script there are the Datasetcomments from 1 to 11).

I want when I open the Dialogbox - ProtocolDlg2, all the data from the report( TO ;DVM TO; Sample Number; ....) to apear in the editboxes, and to have the possibility to modify and after that to print again the report, and close the application.

The datasetcomments are from a txt file. This application is a part of a VBA application.

Attached you have  my script and my file   .SUD

 

Thank you for your time.

0 Kudos
Message 1 of 3
(5,135 Views)
Solution
Accepted by topic author Marse

Hi again,

 

If it isn't possible with the editbox ( I try with a table too, but no succes), please tell another way that I can load the report and modify the data inside the report so I can print after that.

 

Thank you again.

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

Hi Marse,

 

It looks like you're close.  By the way, what version of DIAdem are you using?  It looks like it's not DIAdem 11.0.  In your "ProtocolDlg2" you have a Button1_EventClick event that sets two of the edit boxes:

 

Sub Button1_EventClick()
Dim This : Set This = Button1
  Call SudDlgShow("ReportDlg1", AutoActPath & "Protocol.SUD")
  EditBox1.Text = DataSetComment(4)
  EditBox2.Text = DataSetComment(9)
End Sub

 

But this is what you need to do in the "General Declarations" section for EACH of the edit boxes.  The Button1_EventClick event should be used to store the changed values back into the DataSetComments() array, like this:

 

Sub Button1_EventClick()
Dim This : Set This = Button1
 Call SudDlgShow("ReportDlg1", AutoActPath & "Protocol.SUD")
 DataSetComment(4) = EditBox1.Text
 DataSetComment(9) = EditBox2.Text

End Sub

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

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