| TreeObj - Object Overview TreeAge Pro - Table of Contents TreeAge Pro Interactive - Table of Contents Documentation Home TreeAge Website Home |
| Syntax: | Function MonteCarlo (mcParams as Object) as Object | |
| Description: | This method runs a Monte Carlo simulation at the currently-selected node. | |
| Return value: | Returns a MonteOutput object. | |
| Remarks: | The parameters of the analysis are input by filling in
the properties of the MonteParams object
which is passed in to this method.
The value of lastError is set by this method. If it is zero, the analysis succeeded; otherwise, it will be an error code. Also, the "valid" property of the returned object will be set to false if any error occurs. Also, this method sets the calcTime property to the number of milliseconds required to perform the analysis. Note that you can use the function MonteOutput.TimeElapsed method to determine if the simulation is complete. | |
| Sample code: | Dim mcParams as New MonteParams, mcOutput as MonteOutput Dim cStats as BasicStats, eStats as BasicStats, err as Long Dim grph as GraphObj, gOpts as New GraphicOptions ... '--- prepare and run the simulation | |
| See also: | MonteOutput MonteParams lastError Error codes calcTime MonteOutput.TimeElapsed |