The Simple Forest Model Generator
Originally written June 29, 2022, Updated September 24, 2025

The ForestModel language is used within Patchworks™ to describe stand dynamics. ForestModel is highly expressive and can represent a very broad range of forest conditions, silvicultural practices and disturbance events. The MatrixBuilder tools combines a ForestModel recipe with a forest inventory input to create an input matrix for the Patchwork model. Due to the scope of the language elements writing a ForestModel file by hand would be challenging, but the Simple Forest Model Generator simplifies this process.
The Simple Forest Model Generator is a Microsoft™ Excel workbook application. The workbook contains a set of pre-formatted worksheets and Visual Basic macros that assist in the entry and partial validation of a variety of modeling data. There are worksheet types for collecting yield data, lookup tables, constants, attribute, succession and silvicultural treatments and responses.
The workbook application makes use of the best features of Excel: data validation, easy copy and paste, access to cell formulas for power users. Once the information is filled in a simple click on a menu item calls a VBA macro to gather the information and write out a ForestModel XML file.
The C5 sample dataset that is distributed with Patchworks contains a copy of the Simple Forest Model Generator that is populated with a small sample model, and a copy of this workbook is linked below. This workbook has been updated with the latest ForestModel features, and is a good starting point for developing your own model.
This workbook will continue to get updates as new features are added and bugs are fixed. Check back here often for the latest version, especially prior to beginning a new project.
It is possible to upgrade older workbooks to the latest version, in order to take advantage of newer features. To do so:
- Close all Excel workbooks.
- Download and open the latest ForestModel workbook.
- Press Alt+F8 to show the "View Macros" dialog.
- Select the "UpgradeModel" macro and click on the "Run" button.
- In the dialog provided, select the name of the workbook that you wish to upgrade, and also the name for the newly upgraded workbook. The new workbook must not already exist.
- Click on the "Upgrade" button. The upgrade process may take several minutes, do not click on any windows during this process.
Download Version September 24, 2025
Cumulative update history
| Date | Change |
|---|---|
| September 24, 2025 | External files containing XML fragments can be included at key points in the resulting document. Now literal XML code can also be entered in to the fields to be included in the generated file. Text in the "Files or Fragments" column that starts with the < charater will be treated as literal XML data, otherwise the behaviousr is the same as previously..![]() |
| July 28, 2025 | Add support for column elements in yieldcurves. Add support for absolute or relative expressions on the response sheet. |
| Janury 29, 2025 | Add support for the addprior product attribute |
| October 16, 2024 | Better handling of inline yield curves with more than 32K entries |
| July 17, 2024 | Add options to specify exec tasks, change input workbook metadata |
| June 28, 2024 | Add options to override the default output file names |
| March 18, 2024 | Add middle constants section |
| March 2024 | remove hidden named ranges |
| October 17, 2023 | Add succession renewal value repeat expression |
| June 24, 2022 | Refactor inputs for initial constants and include xml fragment at beginning |
| June 14, 2022 | Refactor repeat attribute columns, add repeat for inputs, succession, features, products |
| June 8, 2022 | Add select repeat clause around attributes |
| June 8, 2022 | Table references with files use the filename instead of an entity |
| March 2, 2022 | If treatment name is an expression then do not add quotes |
| February 27, 2022 | Fixed upgrade and select repeat clause |
| January 27, 2022 | Add treatment repeat clause |
| January 16, 2022 | fix some issues caused by upgrade macro |
| November 26, 2021 | Add upgrade macro |
