Tutorial User Guide > Drive Pages > How is PCL called from drive pages?
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
How is PCL called from drive pages?
There are several ways for drive pages to call PCL functions. In a <dialog> tag, certain attributes can invoke PCL:
inputid
initftn
queftn
exitftn
For a full description of these dialog tag attributes, see Dialog Tag, 54.
The initftn PCL calls will be made before the body of the dialog is displayed in the Dialog Box. When the user clicks on the Apply Inputs button, the value assigned to the inputid attribute is found in the Function Definitions file [.def]. For instance, in the following example, the inputid attribute is set to “readthickness” on the drive page.
<dialog dlgid="cad2"
inputid="readthickness"
...
</dialog>
There must be a corresponding *INPUTID entry in the Function Definitions file (xxx.def) which sets up the parameters for the PCL function call which may or may not have the same name as the *INPUTID name. In the example below, it does have the same name.
*INPUTID=readthickness
*CLASS=AANAV
*FUNCTION=readthickness
*DBOX=REAL,Type: Thickness,1,3.
...
This information is then used to call the PCL function “readthickness” which is defined in the file AANAV.pcl.
FUNCTION readthickness(thick)
REAL thick
IF(thick < 1. || thick > 5. ) THEN
...
END FUNCTION
PCL calls reference the Function Definitions file for calls that require user inputs and corresponding widgets display. When this execution is completed, the optional queftn referenced PCL calls will be made. Finally, when the dialog is exited, the optional exitftn referenced PCL calls will be made.
PCL calls with fixed call sequence arguments can also be invoked through user selection of hypertext links. The MSC Patran embedded HTML widget supports a particular syntax in HREF attributes to anchors for PCL call invocation. See the AAI.html_calls, 127 for the syntax and use of the AAI.html_calls function.