Script examples

By Martin Cerny / Nov 30, 2016

Using Exit and Abort commands

Execution of the Field-Map scripts can be aborted by the Exit and Abort commands. The Exit command stops execution of current script without further consequences for Field-Map operation. If Exit is being used in the script then the rest of the script after Exit command is skipped. Following simplified example demonstrates Exit command:

Read More
By Martin Cerny / Nov 24, 2016

Working with Log window

Log window is available for informing user about progress of execution of data processing task. Following methods are available for...

Read More
By Martin Cerny / Nov 21, 2016

Grouping species

In many tasks of data analysis the results are presented by species. However, often the data are not distributed evenly...

Read More
By Martin Cerny / Nov 5, 2016

Show diameter distribution

Distribution charts are often useful in data analysis. Field-Map provides with the functionality for such purpose: procedure ShowDistributionChart( TableOrLayer :TObjectWrapper;...

Read More
By Martin Cerny / Nov 2, 2016

Parameterize regression models

For parameterization of various regression models Field-Map provides with special function: ParameterizeRegressionModel...

Read More
By Martin Cerny / Oct 16, 2016

Working with Field-Map data – using SQL queries

Relational database management system (RDBMS) which is used for data storage if Field-Map supports SQL queries as a basic tool for querying and manipulating data. This is common for all RDBMS supported by Field-Map: FireBird, MSSQL, Access with minor differences in SQL syntax in each of them.

Read More
By Martin Cerny / Oct 16, 2016

Handling exceptions – Try..Except..Finally

In course of Field-Map Pascal script execution various errors may appear. Such numerical, file or other errors raise exceptions which breaks script execution. Exceptions can be handled by Field-Map Pascal script in order to keep script execution under full control. For handling exception the try..except and try..finally constructs are available.

Read More
By Martin Cerny / Oct 9, 2016

Working with Field-Map data – scan and locate table records

Data in the Field-Map project are organized in layers arranged into relational database. Data table of each layer has number of various attributes (columns) and records (rows). Layers and attributes and accessed by names, records are accessed sequentially when passing-scanning through the table or by locating record by specific values of any attribute (excluding BLOB and MEMO attributes).

Read More
By Martin Cerny / Oct 6, 2016

Calculate tree basal area from DBH

OnChange script on Trees.DBH_mm calculates tree basal area. Whenever the value of DBH_mm is changed the value of BasalArea_m2 is automatically calculated.

Read More