IWxViewExporter.ExportToFile

Syntax

ExportToFile(FileName: String; FormatTag: String);

ExportToFile(FileName: string; FormatTag: string);

Parameters

FileName. Name of the file, to which the object is exported.

FormatTag. Format of the file, to which the object is to be exported. It is possible to export to the following formats:

Description

The ExportToFile method exports a workspace into a file of the specified format.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1.

Add links to the Andy, Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    Exp: IWxViewExporter;
Begin
    ws := UiWorkspace1.WxWorkspace;
    view := ws.CreateView;
    view := ws.Views.Item(
0);
    Exp := 
New WxViewExporter.Create;
    Exp.WxView := view;

    Exp.PixelHeight := 500;
    Exp.PixelHeight := 
300;

    Exp.FullLengthTitle := True;
    Exp.ExportToFile(
"C:\RP.gif""gif");
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Workspace;

 
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    Exp: WxViewExporter = 
New WxViewExporter();
Begin
    ws := uiWorkspaceNet1.WxWorkspace;
    view := ws.CreateView();
    view := ws.Views.Item[
0];
    Exp.WxView := view;

    Exp.PixelHeight := 500;
    Exp.PixelHeight := 
300;

    Exp.FullLengthTitle := True;
    Exp.ExportToFile(
"C:\RP.gif""gif");
End Sub;

After executing this example the workspace is exported into the WS.gif file.

See also:

IWxViewExporter