In this section, we will continue working on our cost calculator class and add more functionalities to it. We will add the ability to calculate the number of trees under a certain excavation and then we will also calculate the cost of removing those trees based on their type.
To calculate the number of trees, we will need to perform a spatial query on the tree feature class to find all trees under the current selected excavation.
If necessary, open Visual Studio Express in administrator mode; we need to do this since our project is actually writing to the registry this time, so it needs administrator permissions. To do that, right-click on Visual Studio and click on Run as administrator.
Go to File, then click on Open Project, browse to the
Yharnam
project from theC:\ArcGISByExample\yharnam\Code
, and click on Open.Double-click on
ExcavationCostCalculator.vb
to edit the code.We will first need to get the tree feature class—we...