Manifold features may be easily combined to create a virtually unlimited range of capabilities. In this example we will combine some simple features to report in acres (or hectares) the surface area of a parcel.
For this example we will use the ZCTA Zip Codes sample project .map file. This shows ZIP codes (postal codes) in the US as areas. We will find the acreage of areas.
Step 1: Make sure the drawing is projected
Load the ZCTA Zip Codes.map sample projects. Open the Zt11_District of Columbia drawing.

To compute areas accurately, we must use the drawing in projected form. Using the Edit - Assign Projection dialog we verify the initial projection of the drawing as Latitude / Longitude. Manifold requires us to do this before we can change the projection of the drawing.
Next, we use the Edit - Change Projection dialog to change the projection to Orthographic, making sure to use the Suggest button to suggest appropriate parameters. Projections will use either meters or feet as units of measure in their coordinate systems. Note that the Orthographic projection uses meters as units of measure in its coordinate system.
Any projection which provides accurate measurement of areas would work just as well. See the Guide to Selecting Map Projections topic for a discussion of different projections.

The projected drawing has a slightly different appearance. This is how the District of Columbia would appear in real life if viewed form an aircraft directly above the District.
Step 2: Show areas in the drawing's table
In the Miscellaneous section of the Tools - Options dialog make sure the Use English measurement units box is checked.
Open the drawing's table. In the View - Columns dialog, enable the ZIPCODE and Area (I) columns for display.

The table now reports the area of each object in the drawing in the Area (I) intrinsic field column, using square feet as the units of measure. It uses square feet because we checked the Use English measurement units box in the Tools - Options dialog; if this box were not checked, then the Area (I) intrinsic field would report the areas as square meters since the Orthographic projection uses meters as units of measure.
At this point we already have our results. We can select any area in the drawing and the row corresponding to that area will also be selected in the table. We can then see the surface area of that area object in square feet listed in the Area (I) column. Divide that value by 43560 to get the surface area in acres (one acre = 43560 square feet).
From this point onward we can do a few additional steps to increase the user friendliness of finding areas. For example, we can make the selection more obvious in the table.
With the focus on the table, press in the Selection Filter button. This will cause the table to show only selected records.

If no area is selected the table will appear empty.

Using touch select, select an area in the drawing.

The record for the selected area will appear in the table. With the Selection Filter button engaged, it is easy to resize the table window so that it occupies a small portion of the display, allowing a larger drawing window. We can then click at will on different areas in the drawing window to select them and immediately see their surface area in square feet.
Step 3: Automatically compute acreage
It would be more convenient if Manifold calculated the surface area for us in acres. This is easy: we can use an active column to automatically convert square feet into acres.

Right click on any of the table's column headings and choose Add - Active Column. In the resulting dialog we specify the characteristics for the new active column. We will use Acres for the name of the new column. It will be a Floating-point (double) type that will be computed on user request. Press OK.

Creating an active column means creating a script that implements the functionality of the column. To make this easier, Manifold helpfully creates a new script populated with some text to use as a starting point.

We edit the starting text as seen above.
Function Func
Func = Record.Data("Area (I)") / 43560
End Function
The function we have created tells Manifold to take the value from the Area (I) column for each record and to divide it by 43560. This will convert square feet into areas. If we preferred some other measure, such as hectares or square miles or square kilometers we could have just as easily used the conversion factor to those from square feet instead of 43560.

Back in the table, we right click on the Acres column head and choose Recompute (note that we right click on the column head). The Acres column now reports the surface area of that area object in acres.
When we created the active column we could have instructed Manifold to recompute the column automatically by choosing a different setting in the Compute box in the Add Active Column dialog. That is not usually done in applications like this because area objects in drawings are not usually continuously changed, so there is no point to frequent recomputation of surface area. It's enough to do it once, on demand, as necessary.

We now have a very useful arrangement. Every time we select a different area object in the drawing...

...the table will immediately report the surface area in acres.
One very useful aspect of active columns is that they work just like any other table column. For example, now that we've defined an active column we can see the value of it for any object by simply double-clicking the object to call up the Object Fields dialog.

We have to press in the r/o (Show Read-Only) button to show the Acres column because it is a read-only column. Together with viewing selected records in the table this gives us a second way of seeing the acreage of any area object in the drawing.
Step 4: Create a ViewBot
Yet a third way of displaying acreage is to create a ViewBot that shows the total acreage of all selected areas. This is easy to do.
Choose View - Panes - ViewBots to turn on the ViewBots pane.

Choose New ViewBot to add a ViewBot to the pane.

In the Add ViewBot dialog we choose the [Selection] as the scope, the Acres column as the source of our data and Sum as the operation. This tells the ViewBot to report the sum of all values in the Acres column for all selected records. The Caption is whatever text line we want to remind us of what the ViewBot is telling us. We choose to Autorefresh to make sure the ViewBot is always up to date when the selection changes. Press OK.

The ViewBot immediately reports the total acreage for the selected area object.

If we click on a different area in the object to select it...

...the ViewBot immediately reports the acreage for that object.

What is very useful about our new ViewBot is that we can select several area objects (using Add to Selection)...

...and the ViewBot will report the sum of the acreages in all the selected area objects. This allows very rapid interaction with the drawing. We can very rapidly add or remove areas from the selection to see exactly how they sum up in acreage. In fact, we can easily save various selections as saved selections, create new selections and so on to use this capability for a sort of manual territory balancing or other interactive work.

If we have the table window still open, note that it continues to show selected records. We can use the ViewBot to see the sum of the acreages and the table to see values for individual records. Outstanding!
ViewBots are such a useful tool that we can add a few more to the ViewBots pane.

We will add a ViewBot that reports the largest parcel in the selection.

We will add one to report the smallest parcel in the selection.

And finally we would like to know the average acreage of parcels in the selection.

We now have a wonderfully interactive display that allows us to select whatever we like and immediately see the total acreage as well as the largest, smallest and average parcel acreages. Outstanding!
Notes
The ViewBot and table will continue to report values for selected items no matter how selection is accomplished. For example, we can select objects using queries or via the Query Toolbar or by other methods. Whatever is selected by whatever means, the ViewBot and table will faithfully report the acreage.
See Also