Knowledge Base



KB10487 - Adding a shape to SHP layer.

To add a shape to a SHP layer, use the following code statement:

layer.AddShape(gisShapeTypeArc) ;

Keep in mind that a SHP file layer is capable of handling only one type of shape, e.g., polygon, line, point, or multi-point. So if the layer was built to handle polygons, it will not be able to handle lines. Check layer.SupportedShapes to learn which kind of shape(s) is supported by a particular layer.

Also remember that calling TGIS_LayerSHP.Build will not delete an existing layer. If the file(s) already exists, TGIS_LayerSHP.Build does nothing.

Created: February 14, 2004, Modified: July 30, 2015