Field-Map Scripting

4.2.1.23 Execute

ImportShapefile.Execute function


Prototype:

function ImportShapefile.Execute :integer;

Description:

Executes importing a shapefile

Syntax:

Layer.ImportShapefile.Execute;

Return value:

Number of imported entities


Note: This function is available since version X7.


Example:


var n:integer;
begin
  RegPoints.ClearTable;
  RegPoints.ImportShapefile.Filename:=ProjectDir+'ToBeImported\Trees_polyg.shp';
  RegPoints.ImportShapefile.AssignAttribute('IDMNGUNITS','IdentificationNumber');
  RegPoints.ImportShapefile.ImportOnlyCentroids:=true;  	
  n:=RegPoints.ImportShapefile.Execute;
  ShowInformation(format('Number of imported entities: %d',[n]));
end.


See also:

Name; Free; ParentName; LayerType; LayerLevel; LayerLabel; AutoTimeStampEnabled; PerformOnChangeScript; PerformOnChangeScriptForAllRecords; PerformLayerScript; OnLineCalliper_AddAttribute; OnLineCalliper_RemoveAttribute; OnLineCalliper_ClearAttributes; OnLineCalliper_GotoAttribute; OnLineCalliper_AddRecordUponReceipt; GetCrownProfileVolumeAndSurface; GetCrownProjectionAsLine; GetCrownProjectionAsPolygon; OpenExternalForm; RelationType; IsValidParentLayer