Drop Map statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Deletes all graphical objects from a table. Cannot be used on linked tables. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Drop Map table

table is the name of an open table.

Description

A Drop Map statement deletes all graphical objects (points, lines, regions, circles, etc.) from an open table, and modifies the table structure so that graphical objects may not be attached to the table.

Note: The Drop Map statement takes effect immediately; no save operation is required. You cannot undo the effect of a Drop Map statement by selecting Revert Table or Undo commands. Similarly, the MapBasic Rollback statement will not undo the effect of a Drop Map statement. Accordingly, you should be extremely cautious when using the Drop Map statement.

After performing a Drop Map operation, you will no longer be able to display the corresponding table in a Map window; the Drop Map statement modifies the table's structure so that objects may no longer be associated with the table. (A subsequent Create Map statement will restore the table's ability to contain graphical objects; however, a Create Map statement will not restore the graphical objects which were discarded during a Drop Map operation.) The Drop Map statement does not affect the number of records in a table. You still can browse a table after performing Drop Map.

If you wish to delete all of the graphical objects from a table, but you intend to attach new graphical objects to the same table, use Delete Object instead of Drop Map.

The Drop Map statement does not work on linked tables.

Example

Open Table "clients"
Drop Map clients 

See Also:

Create Map statement, Create Table statement, Delete statement