FileReadVariable - method of the Pm object

Reading the value of the variable from the file (created by the Pm.FileWriteVariable method).
This method is obsolete (but functional) and it is better to use the PmBuffer.LoadFromFile method.
Variant FileReadVariable(String sFile)
sFile(String) The file name with the path.
If a full path is not entered, then it is completed relative to the application folder.
It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.
The read value can be of any data type, including an array.
If it cannot be read, then returns: null for JavaScript or Empty for VBScript (it can be tested by the Pm.IsValid method).

This method is not functional in Web panels.
JavaScriptVBScriptSelect and copy to clipboard

var Value = Pm.FileReadVariable("#data:Value1.dat");
if (Pm.IsValid(Value))
// .. on success
// .. on error
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- FileReadVariable
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.