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

AVEVA™ Plant SCADA

IProcessAnalyst​.SaveToFile [Method]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Saves the current view using the specified name to the specified location.

Defined As

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

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

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

Parameters

filename

[in] Indicates a relative path and filename which will be used during the saving of the view. See Remarks.

fileLocation

[in] Indicates which known location to save the file to.

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, the return value will be GeneralFailure.

Remarks

On a client where the current user matches the WritePrivilegeLevel only the FileLocation_Server and FileLocation_User options will succeed. Saving using the FileLocation_Server option will save to the locations indicated by PrimaryPath and SecondaryPath properties and into the Project directory.

On a client where the current user does not match the WritePrivilegeLevel only the FileLocation_User will succeed.

Calling Syntax

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

[VBA]

Sub Example()
` Save the view to the server and project
myPage_AN35.SaveToFile "Analyst Views\Test1.pav", 1
End Sub

[Cicode]

FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName("AN35");
` Save the view to the server and project
_ObjectCallMethod(hProcessAnalyst, "SaveToFile", "Analyst Views\Test1.pav", 1);
END

See Also

FileLocation [Enumeration]

IProcessAnalyst.PrimaryPath [Property][Get/Set]

IProcessAnalyst.SecondaryPath [Property][Get/Set]

IProcessAnalyst.WritePrivilegeLevel [Property][Get]

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