|
To create or edit forms, you must have VWorks Technician- or Administrator-level access. You should also have an understanding of how to create protocols in the VWorks software.This topic provides an example of the Pushbutton and File Browsing controls in the Form Designer. For more details, see Adding form controls that allow editing or runtime data display.The following table describes the arguments for the appendProtocolFileToRunset method used in the example script.
string ProtocolPath The protocol file path. In this example, the variable file01 is used for the file path. int RunTimes The number of times (integer) to run the protocol. In this example, we use the variable numRunTimes so that the form users can edit this value. string ProtocolNotes string formToUse
1
2 To configure the File Browsing control, drag File Browsing from General Controls to the Form Canvas. Enter the following settings under File Browsing Properties:
a
b
3 Optional. To provide a caption for the File Browsing control, drag Static from General Controls to the Form Canvas.Under Static Properties, in the Display string field, type the following caption: Select the protocol file:
4 To configure an Edit control that allows users to enter the number of runs, drag Edit control from General Controls to the Form Canvas. Enter the following settings under Edit control Properties:
a
b
c Select Mandatory. If the users forget to enter the number of runs, the software will display an error message after the user selects the protocol and clicks the pushbutton.You can also enter a Default value that the software will use unless the form user changes the value.
5
6 To configure the pushbutton, drag Pushbutton from General Controls to the Form Canvas. Enter the following settings under Pushbutton Properties:
a Click the Script field, and then click thebutton that appears. In the Input Text dialog box, type the following script:
b
c Type the Caption that will appear on the pushbutton, for example, Run Selected Protocol.
d Click the Image field, and then click thebutton that appears. In the Open dialog box, select the following:
7 Click OK to close the Form Designer and save the changes.
1
3 In the Number of times to run box, type a value.
4 Click the custom pushbutton that you created, for example, Run Selected Protocol.