Using the Process Analyst > Process Analyst for Developers > Automation Model > IProcessAnalyst.SaveToFile [Method]

IProcessAnalyst.SaveToFile [Method]

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

Defined As

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.

On a Web Client the FileLocation_User is the only option which will succeed.

See Also

FileLocation [Enumeration], IProcessAnalyst.PrimaryPath [Property][Get/Set], IProcessAnalyst.SecondaryPath [Property][Get/Set], IProcessAnalyst.WritePrivilegeLevel [Property][Get]

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