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 broad range of forest conditions, silvicultural practices, and disturbance events. The MatrixBuilder tool combines a ForestModel recipe with a forest inventory input to create an input matrix for the Patchwork model. Due to the complexity of the language elements, writing a ForestModel file by hand can be challenging; however, 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 various modeling data. There are worksheet types for collecting yield data, lookup tables, constants, attributes, succession, and silvicultural treatments and responses.
The workbook application utilizes the best features of Excel: data validation, easy copy and paste, and 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 distributed with Patchworks contains a copy of the Simple Forest Model Generator that is populated with a small sample model, and a link to this workbook is provided 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 receive updates as new features are added and bugs are fixed. Check back here often for the latest version, especially before starting 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 the "Run" button.
- In the dialog provided, select the name of the workbook that you wish to upgrade, as well as the name for the newly upgraded workbook. The new workbook must not already exist.
- Click 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 into the fields to be included in the generated file. Text in the "Files or Fragments" column that starts with the < character will be treated as literal XML data; otherwise, the behaviour is the same as previously.![]() |
| July 28, 2025 | Add support for column elements in <yieldtable> definitions. Add support for expressions in the response sheet for absolute or relative adjustments. |
| 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 | Fixed some issues caused by upgrade macro |
| November 26, 2021 | Add upgrade macro |
