Field-Map Scripting

4.2.1.22 ImportOnlyCentroids

ImportShapefile.ImportOnlyCentroids property


Prototype:

property ImportShapefile.ImportOnlyCentroids :boolean;

Description:

Specifies whether polygons or centroids only should be imported

Syntax:

Layer.ImportShapefile.ImportOnlyCentroids:=true;


Note: This property 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