SaveXAMLToFile(FileName: String; Rect: IGxRectF; [Scale: IGxRectF = Null]);
FileName - path, name and type of a file.
Rect - map coordinates and dimensions (in mm).
Scale - map scale. Default scale is 1.0.
The SaveXAMLToFile method loads a map to XAML file (*.xaml).
The examined example requires the Report object of the IPrxReport type.
Add links to the Drawing, Map, Metabase, Report, and Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Map: IMap;
Rect: IGxRectF;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT_MAPXAML").Bind As IPrxReport;
Map := Report.ActiveSheet.Table.Objects.Item(0).Extension As IMap;
Rect := Map.View.ViewRect;
Map.SaveXAMLToFile("D:\export+rubbish", Rect);
(Report As IMetabaseObject).Save
End Sub UserProc;
After executing the example the map is loaded to the Map.xaml file.
See also: