*FileName()
Creates a variable of type FileName.
Syntax
*FileName(file_name,"file_label","filter",[INPUT|OUTPUT],edit_option)
Arguments
- file_name
- The variable name of the FileName entity.
- file_label
- The descriptive label of the FileName entity.
- filter
- The filter for the file browser.
- INPUT|OUTPUT
- Use the INPUT key when the file browser is used to open a file. Use the OUTPUT key when the file browser is used to save a file.
- edit_option
- A keyword which specifies whether or not this data member entity is editable in the MotionView graphical user interface. Valid values are: EDIT or NO_EDIT.
Example
*SetFileName(ds_tire_dat.roadfile, "gen_road1.rdf", "gen_road2.rdf")
*SetFileName(ds_tire_dat.tirefile1, "tire.tpf")
*SetReal(ds_tire_dat.rollrad1, 320.00)
*SetReal(ds_tire_dat.rollrad2, 320.00)
*SetFileName(ds_tire_dat.tirefile2, "tire.tpf")
*DefineDataset(dsdef_tire_dat)
*FileName(tirefile1, "Front tire file", "*.tpf", INPUT, EDIT)
*Real(rollrad1, "Front rolling radius")
*FileName(tirefile2, "Rear tire file", "*.tpf", EDIT)
*Real(rollrad2, "Rear rolling radius")
*FileName(roadfile, "Road file", "*.rdf", OUTPUT, NO_EDIT)
*EndDefine()
Context
Properties
Property | Returns Data Type | Description |
---|---|---|
label | string | The descriptive label of the FileName entity. |
state | boolean | Control state (TRUE or FALSE). |
value | string | The value of the FileName entity. |
varname | string | The variable name of the FileName entity. |
base | string | The base name (without extension) of the value of the FileName entity. |
ext | string | The extension of the value of the FileName entity. |
path | string | The complete path excluding the actual filename of the value of the FileName entity. |
filter | string | The filter specified for the FileName entity. |
Comments
File name entities may be created in dataset or table record definitions. Variables created in *FileName() statements can be assigned values in *SetFileName()statements.
MULTI cannot be used inside *DefineTable().To define more than one filter, use the pipe symbol, |, as a separator. For example: *FileName(myfile, "My file", "TPF Files (*.tpf)|*.tpf|XML Files (*.xml)|*.xml|", SINGLE, EDIT)