ArcView Keywords

Home
Up
Undocumented
Documented

 

 

Undocumented ArcView Classes and Keywords

Overview

ArcView class names are special words in the Avenue language.  More than half of them are undocumented.  This page identifies the undocumented class names and explains why it might be useful to know them.  For reference, a complete list of all known class names and keywords is also provided.

Introduction

A crucial aspect of writing good code is having adequate information about your programming or scripting environment. It is aggravating to spend hours designing and debugging code only to discover that seemingly innocent scripts like

AVBFile = "C:\temp\VBFile.txt".AsFilename

or

stringB = "2"
numB = stringB.AsNumber

are not legitimate (try them--they do not even compile). Or even worse, try debugging a script like the following, which contains one tiny typographical error (and therefore compiles!):

theShape = Polygon.MakeNull
nShapc = theShape.AsList.Count
'
' (other code here: I spare you the details)
'
N = nShape
'
' (other code here)
'
if (N = 0) then
    MsgBox.Info("You'll never make it here!", "")
end
' end of script

Discussion

The problem in both these instances is the existence of undocumented classes. That's right, AVBFile, numB, and nShape, as well as polyD, mKey, bStat, and many other names you might naturally use in your scripts, are really class names. That makes them special "reserved words" in the Avenue language. You cannot use them for your variable names.

Every other language invented by computing man includes documentation of its reserved words. That is essential information. However, I have found almost 300 words that (a) act like reserved words in Avenue, yet (b) do not appear in any of the ArcView 3.2 documentation as far as I know.

(I have run exhaustive computer checks of these words against the contents of all the .hlp files installed in ESRI/av_gis30/Arcview/Help. There are probably other undocumented classes that appear to be documented simply because their names accidentally appear somewhere in the help system. Such class names are considered "documented" here.)

A good use of this information would be to look over the list of undocumented words and then file it away in case one day you find it useful.

If you find any information about any of these putative classes I would love to hear from you. Constructive comments--both positive and negative--are, as always, very welcome.

How to identify undocumented reserved words

How can you tell these are reserved words? Put them into a text file, modify the file name in the following script accordingly, and run the script.

sTitle = "Classes?"
sIn = "X:/Scripts/Newclass.txt" ' List of possible class names to test
fnIn = sIn.AsFileName
LFIn = LineFile.Make(fnIn, #FILE_PERM_READ)
N = 0
sReport = ""
while (LFIn.IsAtEnd.Not)
    sText = LFIn.ReadElt
    scrText = Script.Make(sText + "=0") ' That is, treat this name as a variable
    if (scrText.hasError) then ' If we cannot treat it as a variable..
        sReport = sReport + NL + sText ' then report it.
        N = N+1
    end
end
MsgBox.Report(N.AsString ++ "entries:" + sReport, sTitle)
' end of script

This script creates a tiny script for each word in your file.  It tries to assign a value to that word, as if it were a variable name.  If the tiny script fails to compile, that word is a special word in Avenue.

View the undocumented reserved words.

View the "documented" reserved words.

View the latest ESRI technical paper on reserved words.  (Added 16 February 2000; the paper is dated 27 October 1999.)

View the Avenue Programmer's Reference, an organized searchable collection of information about classes, requests, and sample scripts.  

(Created 15 February 2000.)


Google
ColorRamp, Memorized Calculations, Rotate, Sample, XSect, and Tissot  are  trademarks of Quantitative Decisions.  All other products mentioned are registered trademarks or trademarks of their respective companies.
Questions or problems regarding this web site should be directed to information (@quantdec.com).
Copyright © 2000-2005 Quantitative Decisions.  All rights reserved.
Last modified: Thursday August 16, 2001.