*String()

Creates a string entity.

Syntax

*String(str_name, "str_label", edit_option)

Arguments

str_name
The variable name of the string entity.
Data type: varname
str_label
The descriptive label of the string entity.
Data type: label
edit_option
A keyword which specifies whether or not this data member entity is editable in the MediaView graphical user interface. Valid values are: EDIT or NO_EDIT.
Data type: keyword

Example

*DefineDataSet(dsdef_vehpar)
 
*String(model, "Model", EDIT)
 *Integer(wheelbase, "Wheelbase")
 *Real(spr_mass_cg_hgt, "Sprung Mass CG Height")
 *Real(frnt_spr_mass, "Front Sprung Mass")
 *Real(rear_spr_mass, "Rear Sprung Mass")
*EndDefine()
*DataSet(ds_vehpar, "Vehicle Arguments", dsdef_vehpar)
*SetString(ds_vehpar.model, "Sport Utility")
*SetInteger(ds_vehpar.wheelbase, 3000) 
*SetReal(ds_vehpar.spr_mass_cg_hgt, 800.0)
*SetReal(ds_vehpar.frnt_spr_mass, 800.0)
*SetReal(ds_vehpar.rear_spr_mass, 600.0)

Context

*BeginMdl()

*DefineAnalysis()

*DefineDataSet()

*DefineSystem()

*DefineTable()

Properties

Table 1.
Property Returns Data Type Description
label string The descriptive label of the string entity.
state boolean Control state (TRUE or FALSE).
value boolean The value of the string entity.
varname string The variable name of the string entity.

Comments

String entities may be created in dataset or table record definitions.

Variables created in *String() statements are assigned values in *SetString().

When *String() statements are used in a *DefineSystem(), *DefineAnalysis(), or *BeginMDL() block, the string entity is created inside an implicitly created dataset with variable name "Ds_Variable". These string entities are then accessed from this dataset variable name when needed, for example,
*DefineSystem(def_sys …)
   *String(string_name, "string variable")
   *SetString(Ds_Variable.string_name, 100)
*EndDefine()