The following are some basic but extremely useful functions.
One does not need to write Avenue code to use them - they are applied under Edit Table - Field - Calculate
Function name Shape Class Field type Explantion Hint
rec all numeric produces record number rec starts from 0, therefore use (rec +1) to produce consecutive numbers starting from 1
[shape].getx point numeric produces x coordinate of a point
[shape].gety point numeric produces y coordinate
[shape].returncenter.getx polygon numeric produces x coordinate of center of shape extend This does not produce the true centroid! Details are given in this explanation by Bill Huber.
[shape].returncenter.gety polygon numeric produces y coordinate of center of shape extend
[shape].returnarea polygon numeric produces area of polygon in map units
[shape].returnlength line numeric produces length of polyline in map units
[shape].returnextent.gettop  polygon,
line
numeric produces the maximum y value of a shapefile
[shape].returnextent.getright polygon,
line
numeric produces the maximum x value of a shapefile
[shape].returnextent.getbottom polygon,
line
numeric produces the minimum y value of a shapefile
[shape].returnextent.getleft polygon,
line
numeric produces the minimum x value of a shapefile

Whenever I got stuck with ArcView's internal help system, I visited the ArcView Knowledge Base. It was a database of the answers (SUM) of the ArcView-L mailing list. Usually I could find there a solution for my question. Unfortunately, it is now offline. The Only alternative is the ESRI Support Center, which has a nice RSS feed, but relates nowadays mainly to ArcGIS.

back to overview

status: 11.03.2007