Tutorial User Guide > Function Definitions Text File > Function Definitions File Overview
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Function Definitions File Overview
A method is needed to display dialog to the user and simultaneously display and accept data from input boxes or other devices for user interaction such as screen picks, selecting toggle options or typing input values. These user inputs are used as arguments to PCL calls. The Tutorial code provides an easy method of specifying this information without low level graphics programming. A Function Definitions text file which uses a .def file extension accomplishes this.
The home drive page directory as defined by the environment variable ACUMEN_APPLICATIONS defines the path to the Function Definitions file. This text file is simply a listing of function call definitions.
An example of a function definition called “readthickness” in the Function Definitions or .def file is:
#
#Read in a real value input by the user to define a thickness.
#
*INPUTID = readthickness
*CLASS=AANAV
*FUNCTION = readthickness
*DBOX = REAL,Type: Thickness,1,3.
*STATUSCHECK
*DYNAMIC = DFLT.dbox_wid
*LOAD ITEM
This function definition is referenced from the inputid attribute of a <dialog> tag on a drive page. In the following example from a drive page, ”inputid = readthickness ” is used to reference the function definition “readthickness” defined above:
<dialog dlgid=”cad2”
   inputid=”readthickness”
   errordlg=.#2.#badthick”
...
</dialog>
In this example, the value assigned to the inputid attribute (inputid=”readthickness”) references a corresponding *INPUTID entry line in the Function Definitions file (*INPUTID = readthickness). This is how the platform software uses the Function Definitions file to determine what PCL function to call, what the call sequence parameters are, and what widgets (and defaults) need to be displayed to accept the inputs.
Different widget types are supported by this functionality:
 
Databox
Select Databox
File Widget
List Box
Option Menu
Slide Bar
Toggle
Textbox