TreeAge Pro


TreeObj.SensitivityTwo
v1.0
TreeObj - Object Overview
TreeAge Pro - Table of Contents

TreeAge Pro Interactive - Table of Contents

Documentation Home
TreeAge Website Home
  
Syntax: Function SensitivityTwo (saParams1 as Object,
                                      saParams2 as Object) as Object
Description: This method runs a 2-way sensitivity analysis at the currently-selected node.
Return value:  Returns a SensAnTwoOutput object.
Remarks: 

The parameters of the analysis are input by filling in the properties of two SensAnParams different objects which are passed in to this method.

To run a Net Benefits two-way sensitivity analysis, use the TreeObj method SensitivityTwoNetBen.

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.

Sample code: 
Dim saParams1 as New SensAnParams, saParams2 as New SensAnParams 
Dim sa2Output as SensAnTwoOutput
Dim err as Long, grph as GraphObj, htmlStr as String

'--- prepare the analysis parameters
saParams1.variable = "pDie_TxA" saParams1.low = 0.0 saParams1.high = 0.2 saParams1.intervals = 8
saParams2.variable = "pDie_TxB" saParams2.low = 0.1 saParams2.high = 0.3 saParams2.intervals = 8
'--- run the analysis
Set sa2Output = tree.SensitivityTwo(saParams1,saParams2)
err = tree.lastError if err != active_noErr then Set grph = sa2Output.GetGraph (0, "") htmlStr = sa2Output.GetTextReport(0 ) ... else '--- handle the error
end if
See also: SensAnTwoOutput
SensAnParams
SensitivityTwoNetBen
lastError
Error codes
calcTime