This macro writes a text file with a list of formula fields and their
expressions for the current layer. The file is written to the C:\temp
The macro illustrates how to:
- Open, write to, and close a text file.
- Loop over an array.
- Get information about expressions.
You can modify the macro to use a dialog box to choose the name and
folder for the output file, handle dataviews as well as layers, etc.
- Download the file GISDK_WRITE
FORMULAS.ZIP and extract the file WRITE FORMULAS.RSC. A good place
to save the resource file is in the GISDK\Samples folder in the
Maptitude program folder.
- Open or choose the layer that you want to use.
- Choose Tools-GIS Developer's Kit-GISDK Toolbar
to open the GISDK toolbar.
- Compile this macro in the test mode using the Compile button (first
- Run this macro by clicking the second button (Test), typing the
macro name "Write Formulas", clicking the Macro radio button, and