DK for Java | tatukgis.jdk.TGIS_Shape.CopyFields | Constructors | Fields | Methods | Properties
Copies field schema (names, types, constraints) from another shape. Does not copy attribute values. Useful for schema synchronization.
// Java public void CopyFields( TGIS_Shape _shape );
// Oxygene public procedure CopyFields( _shape : TGIS_Shape );
| Name | Type | Description |
|---|---|---|
| _shape | TGIS_Shape | Source shape with field schema to copy. |
PURPOSE:Synchronize field structure (schema replication). When creating new shape, copy source schema for matching attribute structure. Complements CopyGeometry (geometry + CopyFields = full clone).
BEHAVIOR:Copies all field definitions (name, type, width, decimal, rules). Creates equivalent fields in this shape. Attribute values NOT copied (fields empty). Handles field naming collisions intelligently.
USAGE:Clone with fields:shape1.CopyGeometry(source); shape1.CopyFields(source); { geometry + schema, not values }Bulk initialization:for i := 1 to count do begin shape := layer.CreateShape(...); shape.CopyFields(template); { all have same schema } end;
CONSTRAINTS:Copies schema only (not values). Use SetField/GetField manually for value transfer. Field naming conflicts resolved automatically. Complements CopyGeometry (they work independently).