Show contents 

Map > Map Assembly Interfaces > IMapTopobase > IMapTopobase.LoadFromFile

IMapTopobase.LoadFromFile

Syntax

LoadFromFile(FileName: String);

Parameters

FileName. Name of the file, from which a topobase will be loaded.

Description

The LoadFromFile method loads a topobase from a file.

Example

Executing the example requires a form with the following components: the Button component named Button1, the MapBox component named MapBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The file system should include the C:\MAP_RF.tbs file containing a topobase.

The example is a handler of the OnClick event for the Button1 component.

Add links to the ExtCtrls, Forms, and Map system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TopoBase: IMapTopobase;
    Map: IMap;
Begin
    TopoBase := New DxMapTopobase.Create As IMapTopobase;
    TopoBase.LoadFromFile("C:\MAP_RF.tbs");
    Map := UiMap1.Map;
    Map.Topobase := TopoBase;
End Sub Button1OnClick;

After executing the example the topobase from the C:\MAP_RF.tbs file is loaded to the MapBox component.

See also:

IMapTopobase