Exec Event |
This event is executed after the Start Event every time a component is executed. It is the event to which Mathcad supplies inputs and output variables for a Control or Scripted component as visible in the Mathcad worksheet. These are defined as two parameter collections: Inputs and Outputs. These parameters are objects of type DataValue. See DataValues Collection for details.
In this sample, the object is a slider control and its output is being programmed in the Exec event.
Sub SliderEvent_Exec(Inputs,Outputs)
Outputs(0).Value = Slider.Position
End Sub
It is possible for this event function to be called many times after a single Start event is triggered. Script writers should put any "one-time" initialization code in the Start event so that the script is able to handle repeated calls to Exec for processing of input and output data.