DK11 for Delphi | GisLayerVector.TGIS_LayerVector.ImportStructure | Constructors | Fields | Methods | Properties | Events
Imports the field structure from another layer
// Delphi public procedure ImportStructure( const _layer : TGIS_LayerVector ); virtual;
// C++ Builder public: virtual void ImportStructure( TGIS_LayerVector* const _layer );
Name | Type | Description |
---|---|---|
_layer | TGIS_LayerVector | layer to be imported |
Use this method to import the existing field structure from another layer. To do this, simply create a new layer (or use existing layer), choose another layer to import from, and use ImportStructure method passing the chosen layer as a param.
Here is a simple procedure to import the field structure from another layer.
procedure MyClass.GetFieldStructure(); var ll : TGIS_LayerVector ; lv : TGIS_LayerVector ; begin // check whether GIS object has any layers if GIS.IsEmpty then exit ; // Get first layer from the viewer ll:= TGIS_LayerVector (GIS.Items[0]) ; // Create a new layer and set the layer name. lv:=TGIS_LayerVector.Create; lv.Name:='MyLayer'; // Add layer to the viewer. GIS.Add(lv); // Import the field structure from a given layer lv.ImportStructure (ll); end;