ZERO TO NULL Add-In

This macro finds values of zero in numeric fields and changes them to null. It illustrates how to read records in a dataview, get values for some or all of the fields in a record, check and change values in fields, and write updated values back to the fields.

You can read just the records in a selection set and/or visit the records in sort order using different values for the arguments for GetFirstRecord() and GetNextRecord(). You can choose which fields to read or write by building fields_arrays and values_array in different ways. You can fill fields based on the results of expressions. Consider this macro to be a shell that you can adapt to many different tasks.

Installation

  1. Download the file GISDK_ZEROTONULL.ZIP and extract the file ZERO TO NULL.RSC. A good place to save the resource file is in the GISDK\Samples folder in the Maptitude program folder.
  2. Open or make current the dataview that you want to modify.
  3. Choose Tools-GIS Developer's Kit-GISDK Toolbar to open the GISDK toolbar.
  4. Compile this macro in the test mode using the Compile button (first button).
  5. Run this macro by clicking the Test button (second button), typing the name of the macro (Zero to Null), and clicking OK. The type of add-in is macro.
Find Us 1172 Beacon St., Suite 300
Newton MA 02461 USA

Home  |  Products  |  Contact  |  Secure Store

Copyright © Caliper Corporation