IMap.SaveMetafileToFile

Fore Syntax

SaveMetafileToFile(

FileName: String;

Type: GxEmfType;

Width: Integer;

Height: Integer;

Dpi: Double);

Fore.NET Syntax

SaveMetafileToFile(

FileName: string;

Type: Prognoz.Platform.Interop.Drawing.GxEmfType;

Width: integer;

Height: integer;

Dpi: double);

Parameters

FileName. Path to the file to save.

Type. Type of saving metafile.

Width. Image width.

Height. Image height.

Dpi. Resolution capability (number of pixels per inch).

Description

The SaveMetafileToFile method loads a map to a metafile of the specified type.

Comments

The method loads map to an EMF file (*.emf).

Fore Example

Executing the example requires an express report with the EXPRESS identifier.

Add links to the Drawing, Express, Map, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Map: IMap;
Begin
    MB := MetabaseClass.Active;
    Express := MB.ItemById("EXPRESS").Bind As IEaxAnalyzer;
    Map := Express.Map.Map;
    Map.SaveMetafileToFile("C:\img", GxEmfType.EmfOnly, 600600300);
End Sub UserProc;

After executing the example the report map is loaded to a metafile.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;

Imports Prognoz.Platform.Interop.Map;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Map: IMap;
Begin
    MB := Params.Metabase;
    Express := MB.ItemById["
EXPRESS"].Bind() As IEaxAnalyzer;
    Map := Express.Map.Map;
    Map.SaveMetafileToFile("C:\img", GxEmfType.gefEmfOnly, 600600300);

End Sub;

See also:

IMap

Related work items

Requirement