IWxWorkspace.SaveToFile

Syntax

SaveToFile(FileName: String);

SaveToFile(FileName: string);

Parameters

FileName. File name and path.

Description

The SaveToFile method saves a workspace to file.

Example

Executing the example requires that repository contains a workspace with the WSP identifier.

Add links to the Andy, Drawing, Metabase system assemblies.


Sub Userproc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
Begin
    // Get workspace
    mb := MetabaseClass.Active;
    wsp := mb.ItemById("WSP").Edit As IWxWorkspace;
    wsp.SaveToFile("c:\RP.p5w");
    (wsp As IMetabaseObject).Save;
End Sub Userproc;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;

 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
Begin
    
// Get workspace
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    wsp.SaveToFile("c:\RP.p5w");
    (wsp 
As IMetabaseObject).Save();
End Sub;

After executing the example the workspace is saved to file.

See also:

IWxWorkspace