CB.DataAnalysisND

The Data Analysis tool imports data directly into Crystal Ball forecasts for further analysis. This call runs the Data Analysis tool and displays results without using a dialog.

Note:

Before calling CB.DataAnalysisND, reset the Crystal Ball simulation.

Table 42. CB.DataAnalysisND Parameters

Parameter

Required?

VBA Data Type

Table

Index

Required

Integer

Table 43

Value

Optional

Variant

Table 44

Table 43. CB.DataAnalysisND Index Parameter — Required, Integer

Named Constant Value

VBA Data Type

Index Value

Description

cbDataAnalysisRun

Integer

1

Runs the Data Analysis tool when all settings are complete

cbDataAnalysisSelectData

Integer

2

Selects the numeric portion of the data to be imported. The range can either be specified as a separate line preceding the CB.DataAnalysisND call, such as [A1:C100].Select, or it can be the Value parameter, specified as "A1:C100" or similar.

cbDataAnalysisDataOrientation

Integer

3

Works with Value to specify whether data is in rows or columns:

cbDataAnalysisDataInRows [1]

cbDataAnalysisDataInColumns [2]

cbDataAnalysisSelectHeaders

Integer

4

Uses a boolean value for the Value parameter to include column header text in the selection; True = include the top row of text

cbDataAnalysisSelectLabels

Integer

5

Uses a boolean value for the Value parameter to include row label text in the selection; True = include the first column of text

cbDataAnalysisSelectLSL

Integer

6

Sets the selected range of values as forecast LSLs (lower specification limit) for process capability analysis. The range can either be specified as a separate line preceding the CB.DataAnalysisND call, such as [A1:C10].Select, or it can be the Value parameter, specified as "A1:C10" or similar.

cbDataAnalysisSelectUSL

Integer

7

Sets the selected range of values as forecast USLs (upper specification limit) for process capability analysis. See cbDataAnalysisSelectLSL for selection examples.

cbDataAnalysisSelectTarget

Integer

8

Sets the selected range of values as forecast Targets (target values) for process capability analysis. See cbDataAnalysisSelectLSL for selection examples.

cbDataAnalysisAutoOpenCharts

Integer

9

Uses a boolean value for the Value parameter to indicate whether to open forecast charts automatically when the data analysis runs; True = automatically open charts.

cbDataAnalysisSetViewType

Integer

10

If charts are shown, takes cbChtChartType constants from CB.ChartPrefsND as the Value parameter to determine which chart view appears. See Table 24 for constants.

cbDataAnalysisFitToDistribution

Integer

11

Uses a boolean value for the Value parameter to indicate whether forecast charts should be fitted to a distribution; True = fit to distributions.

cbDataAnalysisRankingMethod

Integer

12

If cbDataAnalysisFitToDistribution is True, works with Value to specify a ranking method for distribution fitting. See Table 78 for constants.

cbDataAnalysisGenerateCorrelationMatrix

Integer

13

Uses a boolean value for the Value parameter to indicate whether rank correlations between forecast charts should be displayed in a matrix; True = generate matrix.

cbDataAnalysisRunOnAllModels

Integer

14

Uses a boolean value for the Value parameter to indicate whether a simulation is run on all open workbooks at the same time the selected data is analyzed. In this case, forecast charts for all opened models appear with those generated from the data selected for analysis. True = run the simulation on all open workbooks; this setting can be used for validating models.

cbDataAnalysisResetSessionVariable

Integer

17

Resets all session variables related to the CB.DataAnalysisND Developer Kit call including the input data series and the LSL, USL, and Target capability values.

Table 44. CB.DataAnalysisND Value Parameter — Optional, Variant

Related Value

Named Constant Value

VBA Data Type

Index Value

Description

For Index = 2, cbDataAnalysisSelectData

A cell reference with format:Range("A1:C300") or "A1:C300"

Variant

n/a

Specifies the numeric portion of the data to be imported

For Index = 3, cbDataAnalysisDataOrientation

cbDataAnalysisDataInRows

Integer

1

Indicates that data cells are in rows

For Index = 3, cbDataAnalysisDataOrientation

cbDataAnalysisDataInColumns

Integer

2

Indicates that data cells are in columns

For Index = 4, cbDataAnalysisSelectHeaders

True or False

Boolean

n/a

Indicates whether to include column header text in the selection; True = include the top row of text

For Index = 5, cbDataAnalysisSelectLabels

True or False

Boolean

n/a

Indicates whether to include row label text in the selection; True = include the first column of text

For Index = 6, cbDataAnalysisSelectLSL

A cell reference with format:Range("A1:C300") or "A1:C300"

Variant

n/a

Sets the selected range of values as forecast LSLs (lower specification limit) for process capability analysis

For Index = 7, cbDataAnalysisSelectUSL

A cell reference with format:Range("A1:C300") or "A1:C300"

Variant

n/a

Sets the selected range of values as forecast USLs (upper specification limit) for process capability analysis

For Index = 8, cbDataAnalysisSelect Target

A cell reference with format:Range("A1:C300") or "A1:C300"

Variant

n/a

Sets the selected range of values as forecast Targets (target values) for process capability analysis

For Index = 9, cbDataAnalysisAutoOpenCharts

True or False

Boolean

n/a

Indicates whether to open forecast charts automatically when the data analysis runs; True = automatically open charts

For Index = 10, cbDataAnalysisSetViewType

Constants (Table 24)

Integer

See Table 24

Uses cbChtChartType constants from CB.ChartPrefsND to determine which chart view appears. See Table 24 for constants. The following views are allowed: frequency, cumulative frequency, reverse cumulative frequency, capability metrics, statistics, percentiles, and goodness of fit.

For Index = 11, cbDataAnalysisFitTo Distribution

True or False

Boolean

n/a

Indicates whether forecast charts should be fitted to a distribution; True = fit to distributions

For Index = 12, cbDataAnalysisRankingMethod

Constants (Table 78)

Integer

See Table 78

Specifies a ranking method for distribution fitting. See Table 78 for constants

For Index = 13, cbDataAnalysisGenerate CorrelationMatrix

True or False

Boolean

n/a

Indicates whether rank correlations between forecast charts should be displayed in a matrix; True = generate matrix

For Index = 14, cbDataAnalysisRunOnAllModels

True or False

Boolean

n/a

Indicates whether a simulation is run on all open workbooks at the same time the selected data is analyzed; True = run the simulation on all open workbooks