Knowledge Base

KB10521 - Problem loading configuration files (old .INI config files).

Question from a DK customer: "​We have a problem with the DK loading configuration files (old .INI config files) even with setting TGIS_LayerSHP.UseConfig=false and TGIS_LayerSHP.UseFileParams=false. It seems to be ignoring the false settings? We have provided our code for your review."

The problem is you are using the .userConfig=FALSE setting after adding the layer to the viewer (the INI file will be read upon .Add). You should use UserConfig before call .Add, as follows:

TfrmMain.Button1Click(Sender: TObject);
; ll : TGIS_LayerVector ;
; ll := TGIS_LayerSHP.Create ;
; ll.Path := 'c:\temp\testbed\states.shp' ;
; ll.UseConfig := False ;
; GIS.Add( ll ) ;
; GIS.FullExtent ;
end ;< p>

Created: April 09, 2004, Modified: August 28, 2015