PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
mlSaveWorkspace (Function)
In French: mlSauveEspaceDeTravail
Saves the workspace of the session in a MATLAB file.
Example
gnSessionID is int = mlInitialize()
IF ErrorOccurred THEN
ErrorInfo(errFullDetails)
RETURN
END

sWorkspaceName is string = "TestWorkS.mat"
sVariableName, sListVariables is string
arrR is array of 1 by 1 reals

mlExecute(gnSessionID, "myVar = 1")
Trace("1 - Variables: " + mlListVariable(gnSessionID))
mlSaveWorkspace(gnSessionID, sWorkspaceName)

mlResetWorkspace(gnSessionID)
Trace("2 - Variables: " + mlListVariable(gnSessionID))
mlExecute(gnSessionID, "myErasedVar = 2")
mlLoadWorkspace(nSessionID, sWorkspaceName, False)
sListVariables = mlListVariable(gnSessionID)
Trace("3 - Variables: " + sListVariables)
Syntax
<Result> = mlSaveWorkspace(<Session Identifier> , <File Name>)
<Result>: Boolean
  • True if the backup was successful.
  • False otherwise (if no variable is defined in the session for example). To find out the error details, use ErrorInfo associated with the errMessage constant.
<Session Identifier>: Integer
Identifier of MATLAB session. This identifier is returned by mlInitialize.
<File Name>: Character string (with quotes)
Path and name of the Mat-File file to use.
Components
WINDEVReports and Queries wd230com.dll
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment