DeleteArea()

Summary

Deletes an area feature from an area layer.

Syntax

old_id = DeleteArea(int ID)

Argument Contents
ID The ID of the area to delete

Returns

The integer ID of the deleted area.

Notes

  • The current layer must be a topological area layer in a standard geographic file, which can be determined with GetDBTopology(), or an Oracle Spatial layer.

  • DeleteArea() deletes all of the polygons in an area, and deletes any edges that are used only by that area.

  • DeleteArea() forces any remaining edges that have become boundary edges to be in the forward direction, so they will be drawn.

Example

// Delete an area from a parcel file
SetLayer("Parcels")
old_id = DeleteArea(43)
ShowMessage("Area " + i2s(old_id) + " deleted")

Error Codes

Error Type Meaning
Error The current layer is not an area layer, or is not from a standard geographic file; or ID does not exist

See Also

Function Summary
AddArea() Adds an area feature to an area layer
GetArea() Get the coordinates that describe an area feature
GetDBTopology() Determines whether a standard geographic file is topological