This macro marks as duplicates any records that have the same value in a
field as the first record with that value. This macro illustrates how to:
- Loop over the records in sorted order
- Read a value from a field
- Find the first record in a group
- Write a value to a field
You can modify the macro to use a dialog box to get the values for the
input variable, mark members of a group with a counter (1, 2, 3, etc.), add
the duplicates to a selection set, etc.
Installation
- Download the file GISDK_Mark
Duplicates.zip and extract the file MARK DUPLICATES.RSC. A good
place to save the resource file is in the GISDK\Samples folder in the
Maptitude program folder.
- Open the table that you want to use and get the name of the
dataview.
- Edit the initialization section to set the values of the variables
and save the changes.
- Choose Tools-GIS Developer's Kit-GISDK Toolbar
to open the GISDK toolbar.
- Compile this macro in test mode using the Compile button (first
button).
- Run this macro by clicking the Test button (second button), typing
the macro name (Mark Duplicates), clicking the Macro radio button, and
clicking OK.