User Tools

Site Tools


api:dk11:delphi:gisviewer.tgis_viewer.readconfig_void

Table of Contents

TGIS_Viewer.ReadConfig method

DK11 for Delphi | GisViewer.TGIS_Viewer.ReadConfig | Constructors | Fields | Methods | Properties | Events

Read all configuration data from project.

Available also on: .NET | Java | ActiveX | Python.

Syntax

Implements IGIS_Viewer.ReadConfig.

// Delphi
public
  procedure ReadConfig;
// C++ Builder
public:
  void ReadConfig(void);

Remarks

This method is called internally in Open method while working with projects. Primary parameters will be read. Screen will be invalidated.

Example

Delphi

procedure MyClass.GISOpen( _path : string );
var
  la : TGIS_LayerAbstract ;
begin
  try
    // open a project
    la := GisCreateLayer( 'myname', _path ) ;
    if not assigned( la ) then exit ;
 
 
    // using a config file and a file params
    la.IgnoreShapeParams := true;
    la.UseConfig := True;
    la.ConfigName := 'config.ini';
 
    // let's read settings
    la.ReadConfig;
 
    // and show results
    GIS.Add( la ) ;
    GIS.FullExtent;
 
    dosomething();
 
    // and after some changes let's write fset_tings
    TGIS_LayerVector(GIS.Get('myname')).WriteConfig;
    TGIS_LayerVector(GIS.Get('myname')).SaveAll ;
 
  except
  end ;
end ;
2022/11/30 19:19

Page Tools