Show:
Module: ABE

Access to properties of the current stand treatment program. the STP can be accessed via the stp property of a stand, or using the this keyword within event handlers of STPs.

Note that the in earler versions, the variable stp was provided in the global context.

See also: Variables stand (Stand)

Item Index

Properties

Properties

name

String

The name of the stand treatment program as provided when called the respecitve 'fmengine' functions.

See also: fmengine.addManagement

options

Object

The 'options' property provides a link to the 'options' property of the STP definition, i.e., this is a mechanism that can be used to pass purely javascript options/values to other javascript code (e.g., when an activity within the stand context is executed). Note that the C++ part of ABE does not interfere with these options.

           // definition of the STP
                               var stp: { U: [110, 130, 150], // define the rotation period
                                   clearcut: a_clearcut, // some activities
                                   options: { dbh: 5, someOtherParameter: 50}
                               }
                    
                               // definition of activities… here the ‘dbh’ options is used
                               // in the Javascript code to select trees to harvest.
                               var a_clearcut: {
                                  type: "scheduled", … ,
                                  onEvaluate: function() {
                                           trees.loadAll();
                                           trees.harvest("dbh>" + stp.options.dbh );}
                                        }
                               };