HOME EasyCalculate 10 - Why it is different? HOME

EasyCalculate 5.0 was for a long time a very popular set of expressions for the Field Calculator. The expressions however were written in Visual Basic for Applications (VBA) which is not supported in ArcGIS 10.

We are receiving on daily basis messages from people asking whether we are intending to make EasyCalculate 5.0 compatible with the ArcGIS 10 Field Calculator. After considering this for some time, we decided that there is no point in that.

• The main reason EasyCalculate 5.0 is used so widely is that there are many ArcGIS users that are capable of understanding and customizing existing scripts to suite their needs and writing their own VBA scripts. From this point of view rewriting the existing expressions in VB Script or Python will not help much.
• Debugging in the Field Calculator is a nightmare which makes the creating complex expressions very difficult .
• The performance of Python scripts in the field calculator is not good

While considering the above, several questions were popping constantly up:

1. The Field Calculator is an excellent tool, but do we need it for complex expressions?
2. Can we leave the simple expressions for the Field Calculator and use something else for the complex ones?
3. Having in mind that VBA will be completely out in ArcGIS 10.1 - what environment will be the best for users that already have experience with VBA used in ArcGIS for many years?

Lets start with the last question. VBA is still available in ArcGIS 10, but it will go away sooner rather than later. So, can we utilize our VBA skills in the future, or we just need to forget about them and start learning Python?  See this article

Now to the question 2 above - Can we replace the field calculator for some complex expressions?

We need that in order to:

• be able to use language similar to VBA;
• be able to debug easier;
• make our calculations faster;
• be able to use ArcObjects in  the calculations.

What the Field Calculator actually does?  - It is as simple as going trough the records of the attribute table and populates the field values of a field based on an expression entered by the user. So it will not be that difficult to emulate the behavior of the Field Calculator with a simple code like

 We are passing to our calculator: the input (in the case above a feature layer); the expression that needs to be calculated; the field that we want to populate with the results The expressions can be small functions that will perform the operation we need.

As a conclusion we'll go back to the question 1 above - Do we need the Field Calculator for complex expressions?  What is better:

• To write scripts in the Field Calculator  that are

• so difficult to debug (remember that at the moment of writing these expressions are just text. When executed they are going through a parser that converts this text to executable code).

• cannot use ArcObjects

• have to be in Python or VB Script

• To write scripts

• in a language with syntax very close to VBA which we have used for so many years to customize ArcGIS

• that can be debugged while writing

• that can  access the native ArcGIS objects

• execute much faster.

See the code of EasyCalculate 10 for an implementation of the above idea.

 For any comments and enquiries contact: webmaster@ian-ko.com Esri and all Esri products mentioned are trademarks of Environmental Systems Research Institute, Inc. Copyright: Ianko Tchoukanski