CB.GetTwoDSimulationOption

This function returns specified settings made by CB.TwoDSimulationND or the 2D Simulation tool.

Table 133. CB.GetTwoDSimulationOption Returned Data Type

Returned Value

Returned Data Type

The specified 2D Simulation settings

Variant

Table 134. CB.GetTwoDSimulationOption Parameters

Parameter

Required?

VBA Data Type

Table

Index

Required

Integer

Table 135

Value1

Optional

Integer

Table 136

Value2

Optional

Variant

Table 137

Table 135. CB.GetTwoDSimulationOption Index Parameter – Required, Integer

Value or Named Constant

Index

Description

cbTwoDGetTarget

1

Returns the address of the selected target forecast for the 2D simulation operation (operates on the forecast in the currently selected cell; use [cell].Select first to select the cell)

cbTwoDGetAssum

2

Works with Value1 to enumerate the list of assumptions by type (uncertainty or variability); returns a string containg the full name (cell address) of the cells. Each successive call returns the next assumption in the list.

cbTwoDOuterSimTrials

3

Returns the number of trials in the outer (uncertainty) simulation loop

cbTwoDInnerSimTrials

4

Returns the number of trials in the inner (variability) simulation loop

cbTwoDForeOption

5

Returns the Value1 constant that indicates the current setting for forecast chart window display options

cbTwoDOutputOption

6

Used with Value1 to get output report options

cbTwoDPercent

7

Used with Value1 to return current percentile settings; optionally, you can supply a Microsoft Excel range to fill with percentile values

cbTwoDMSDOption

8

Returns the maximum number of uncertainty simulations to display in the output report and overlay chart

Table 136. CB.GetTwoDSimulationOption Value1 Parameter – Optional, Integer

Related Value

Value or Named Constant

Index

Description

For Index = 2, cbTwoDGetAssum: Integer

cbTwoDGetUncerainty

1

Used with cbTwoDGetAssum to enumerate the list of selected uncertainty assumptions

For Index = 2, cbTwoDGetAssum: Integer

cbTwoDGetVariability

2

Used with cbTwoDGetAssum to enumerate the list of selected variability assumptions

For Index = 3, cbTwoDOuterSim Trials

Positive whole number (integer)

n/a

Used with cbTwoDOuterSimTrials to indicate the number of trials in the outer (uncertainty) simulation

For Index = 4, cbTwoDInnerSim Trials

Positive whole number (integer)

n/a

Used with cbTwoDInnerSimTrials to indicate the number of trials in the inner (variability) simulation

For Index = 5, cbTwoDForeOption: Integer

cbTwoDShowDefineFore

1

Returned to indicate that all defined forecasts are displayed; the equivalent of the Show Forecasts As Defined dialog setting

For Index = 5, cbTwoDForeOption: Integer

cbTwoDShowTargetFore

2

Returned to indicate that only the target forecast is displayed; the equivalent of the Show Only Target Forecast dialog setting

For Index = 5, cbTwoDForeOption: Integer

cbTwoDHideFore

3

Returned to indicate that all forecasts are hidden; the equivalent of the Hide All Forecasts dialog setting

For Index = 6, cbTwoDOutputOption: Integer

cbTwoDShowForeStat

1

Returns a boolean Value2 parameter to indicate whether to include forecast statistics in the output report; if followed by True, includes statistics in the report

For Index = 6, cbTwoDOutputOption: Integer

cbTwoDShowPercentiles

2

Returns a boolean Value2 parameter to specify whether to include percentiles in the output report; if followed by True, includes percentiles in the report

For Index = 6, cbTwoDOutputOption: Integer

cbTwoDShowCapMetrics

3

Returns a boolean Value2 parameter to specify whether to include capability metrics in the output report; if followed by True, includes capability metrics in the report

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentTenNinety

1

Returned by cbTwoDPercent to indicate the 10th and 90th percentiles

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentFiveNinetyFive

2

Returned by cbTwoDPercent to indicate the 5th and 95th percentiles

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentQuartiles

3

Returned by cbTwoDPercent to indicate quartiles (25%-ile increments from 0 to 100, inclusive)

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentQuintiles

4

Returned by cbTwoDPercent to indicate quintiles (20%-ile increments from 0 to 100, inclusive)

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentDeciles

5

Returned by cbTwoDPercent to indicate deciles (10%-ile increments from 0 to 100, inclusive)

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentIcosatiles

6

Returned by cbTwoDPercent to indicate icosatiles (5%-ile increments from 0 to 100, inclusive)

For Index = 7, cbTwoDPercent: Integer

cbTwoDPercentCustom

7

Returned by cbTwoDPercent to indicate custom percentiles. If cbTwoDPercentCustom is supplied as a parameter along with a valid Microsoft Excel range, fills a column-oriented range with percentiles in the custom list, starting with the cell passed in the range.

For Index = 8, cbTwoDMSDOption: Integer

Integer from 2 to 250, inclusive

n/a

Returned to indicate the maximum number of uncertainty simulations to display in the output report and overlay chart

Table 137. CB.GetTwoDSimulationOption Value2 Parameter – Optional, Variant

Related Value

Value or Named Constant

VBA Data Type

Index

Description

For Index = 6, cbTwoDOutputOption: Integer

True or False

Boolean

n/a

Indicates whether the specified Value1 constant is active or not; if set to True, the specified items are included in the output report

For Value1 = cbTwoDPercentCustom

A string containing a Microsoft Excel range to hold desired percentile values

String

n/a

Returns custom percentile values specified for CB.TwoDSimulationND