Promotic
WikipediaLinkedInYoutubeTwitterFacebook

FileReadVariable - method of object Pm

Description:
Reading the value of the variable from the file (created by the Pm.FileWriteVariable method).
Syntax:
FileReadVariable(sFile As String) As Variant
Calling:
val = Pm.FileReadVariable(sFile)
Parameters:
sFile(String) The file name with the path. If a full path is not entered, then it is completed relatively according to the application file folder.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

Note:
The read value can be of any data type, including an array.

If it cannot be read, then it returns Empty.

 
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
Example:
VBScriptSelect and copy to clipboard

Dim Value
Value = Pm.FileReadVariable("#data:Value1.dat")
If Pm.IsValid(Value) Then
  '.. on success
Else
  '.. on error
End If
PROMOTIC 8.3.27 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- FileReadVariable
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice