*Procedure()

Creates a procedure.

*This statement has been deprecated and all functionality is now contained in the *DefineTemplate() - procedure statement.

Syntax

*Procedure(proc_name,"proc_label",proc_def, arg_1, arg_2,, arg_n)

Arguments

proc_name
The variable name of the procedure.
Data type: varname
proc_label
The descriptive label of the procedure.
Data type: label
proc_def
An existing procedure definition.
Data type: DefineProcedure
arg_1, arg_2, ..., arg_n
A list of arguments for the procedure.
Data type: user-defined

Example

*DefineTemplate(def_tem_write_vehpar, ds)
  Vehicle model                 {ds.model.value}
  Vehicle wheelbase             {ds.wheelbase.value}
  Sprung mass CG height         {ds.spr_mass_cg_hgt.value}
  Front sprung mass             {ds.frnt_spr_mass.value}
  Rear sprung mass              {ds.rear_spr_mass.value}
*EndDefine()
*DefineProcedure(def_write, ds, tem_write_vehpar)
   *Write(ds.filename.value, CREATE, tem_write_vehpar)
*EndDefine()
*Template(tem_write_vehpar,     "Write Vehicle Parameters", 
                  USER, 
                                def_tem_write_vehpar, 
                                ds_vehpar)
*Procedure(write,              "Write Parameters", 
                 def_write, 
                     ds_vehpar, 
                     tem_write_vehpar)
*DefineForm(frmdef_parameters, ds, proc)
  *SetRowsCols(3, 4)
  *SetCell(1, 1, ds.model.label)
  *SetCell(1, 2, ds.model.value, , right, edit)
  *SetCell(2, 2, proc.run)
*EndDefine()
*Form(frm_param, "Vehicle parameters", frmdef_parameters, 
                                        ds_vehpar, 
                           write)

Context

*BeginMdl()

*DefineAnalysis()

*DefineSystem()

Properties

Table 1.
Property Returns Data Type Description
Label string The descriptive label of the procedure.
Run n/a Execute the instructions in the procedure.
State boolean Control state (TRUE or FALSE).
Varname string The variable name of the procedure.

Comments

The number and type of arguments passed into the procedure depends on the procedure definition.

Procedures are triggered from a push-button in a user-defined from. This push-button is automatically created in a cell when the value of that cell is set to proc_name.run in the *SetCell() statement.