Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

IProcessAnalyst​.LoadFromFile [Method]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Loads a specified view into the Process Analyst.

Defined As

  • [VBA] LoadFromFile(filename As String, fileLocation As Integer)

  • [Cicode] LoadFromFile(STRING filename, INT fileLocation)

  • [C++] HRESULT LoadFromFile(BSTR filename, FileLocation fileLocation)

Parameters

filename

[in] Indicates a relative path and filename of the view to load into the Process Analyst. See Remarks, below.

fileLocation

[in] Indicates which known location to load the file from.

Execution Result

If the function succeeds the return value will be Success. If the filename is invalid the return value will be InvalidArgument. If the path indicated by fileLocation is invalid or offline then the return value will be PathNotFound. If any other problem occurs then the return value will be GeneralFailure.

Remarks

This method will replace the current view with the one in the specified file.

Absolute paths are not necessary for the filename as the method has been designed to load the specified file from [Run]:\Analyst Views (FileLocation_Local), my documents folder (FileLocation_User) or from the primary/secondary paths (FileLocation_Server).

When a file is loaded it will be synchronized with the other locations to verify each location has the file which is the latest. If the file you are loading is older then one which exists in another location it will be replaced.

Calling Syntax

Assumes you have a page called "myPage" and the Process Analyst has been named "AN35".

[VBA]

Sub Example()
` Load the view from the server
myPage_AN35.LoadFromFile "Test1.pav", 0
End Sub

[Cicode]

FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName("AN35");
_ObjectCallMethod(hProcessAnalyst, "LoadFromFile","Test1.pav", 0);
END

See Also

FileLocation [Enumeration]

IProcessAnalyst.PrimaryPath [Property][Get/Set]

IProcessAnalyst.SecondaryPath [Property][Get/Set]

In This Topic
TitleResults for “How to create a CRG?”Also Available in