This function extracts Crystal Ball data from the the current simulation. For any preferences not explicitly set, the default is the current setting in the Extract Data dialog. Use CB.CheckData before using this call. You can extract more than one type of data. For details, see CB.ExtractDataND Example 2.
Note: | Before calling this function, run a simulation, OptQuest optimization, or Predictor time-series forecast. |
Table 66. CB.ExtractDataND Parameters
Specifies which extract preference you are setting. See Table 67, following. | ||
Specifies settings for the preference indicated by the Index. See Table 67 for more information. | ||
Specifies whether to extract the specified data type. See CB.ExtractDataND Example 2. |
The following are named constant and index values for the Index parameter.
Table 67. CB.ExtractDataND Index Parameter Values (Required, Integer) with Related Value Parameter Values (Optional, Variant)
Extracts the data. Use this parameter after setting other extract options. | |||
See Table 68 | Specifies the type of data to extract. Used with these Value parameter values, described in Table 68: 1 = cbDatForeValues (CB 2000.x or 5.x only), 1 = cbDatValues (CB 7.x and 11.x or later), 2 = cbDatStatistics, 3 = cbDatPercentiles, 4 = cbDatFrequencies, 6 = cbDatSensitiv, 7 = cbDatCapMetrics. | ||
See Table 69 | Specifies which forecasts to include. Used with these Value parameter values, described in Table 69: 1 = cbChfAll, 2 = cbChfOpen, 3 = cbChfChosen, 4 = cbChfAdd, 5 = cbChfClearList. | ||
See Table 70 | Specifies which percentiles to extract. Used with these Value parameter values, described in Table 70: 1 = cbPctQuartiles, 2 = cbPctQuintiles, 3 = cbPctDeciles, 4 = cbPctIcosatiles, 5 = cbPctSet1, 6 = cbPctSet2, 7 = cbPctSet3, 8 = cbPctSet4. | ||
True extracts data to a new worksheet called Data in the active workbook. False extracts data to a new worksheet called Data in a new workbook. | |||
See Table 71 | Specifies which assumptions to include. Used with these Value parameter values, described in Table 71: 1 = cbChaAll, 2 = cbChaChosen, 3 = cbChaAdd, 4 = cbChaClearList, 5 = cbChaOpen. | ||
Indicates how many bins (value groups or intervals) to include. | |||
True includes cell location information. False does not include cell location information. | |||
True applies formatting to the cells as appropriate. False does not apply formatting. | |||
The name of the sheet where extracted data is placed. The sheet name must follow appropriate sheet naming restrictions. | |||
Specifies the first (upper-left) cell of the extracted data. | |||
See Table 72 | Indicates where to extract the data, described in Table 72: 1 = cbExtNewWorkbook, 2 = cbExtCurrentWorkbook_NewSheet, 3 = cbExtCurrentWorkbook_CurrentSheet. | ||
See Table 73 | Indicates which OptQuest data to extract following an optimization run. If not explicitly set, the current settings from the Extract Data dialog are used. | ||
See Table 74 | Indicates which decision variable data to extract following an optimization run. If not explicitly set, the current settings from the Extract Data dialog are used. | ||
cbExtDataPredictorType | 16 | Constant name or number as described in the next table cell. | Specifies which type of Predictor data to extract:
Note: The constant is followed by a boolean (True or False) to indicate whether the constant is active or not. |
cbExtPredictorResultsSheetName | 17 | The name of the sheet where extracted Predictor results data is placed. The sheet name must follow appropriate sheet naming restrictions. | |
cbExtPredictorMethodsSheetName | 18 | The name of the sheet where extracted Predictor methods data is placed. The sheet name must follow appropriate sheet naming restrictions. | |
cbExtPredictorResultsHistorical | 19 | True includes historical data in extracted results. False does not include historical data. | |
cbExtPredictorResultsFitted | 20 | True includes fitted data in extracted results. False does not include fitted data. | |
cbExtPredictorResultsForecast | 21 | True includes forecasted data in extracted results. False does not include forecasteddata. | |
cbExtPredictorResultsConfidence | 22 | True includes confidence interval data in extracted results. False does not include confidence interval data. | |
cbExtPredictorResultsResiduals | 23 | True includes residuals data in extracted results. False does not include residuals data. For information on residuals data, see the Oracle Crystal Ball Predictor User's Guide. | |
cbExtPredictorMethodsErrors | 24 | True includes methods error data in extracted results. False does not include methods error data. | |
cbExtPredictorMethodsStatistics | 25 | True includes methods statistics data in extracted results. False does not include methods statistics data. | |
cbExtPredictorMethodsParameters | 26 | True includes methods parameters data in extracted results. False does not include methods parameters data. | |
cbExtPredictorMethodsRanking | 27 | True includes methods ranking data in extracted results. False does not include methods ranking data. | |
cbExtChartBinsUseEntireRange | 28 | True or False | True uses the entire chart range, including extreme values that are not displayed. False uses only the displayed chart range. |
The following values are used with Index = cbExtDataType to specify the type of Crystal Ball data to extract.
Table 68. Value Parameter Values that Support Index Constant cbExtDataType
The following values are used with Index = cbExtChooseFore to specify forecast data for extraction.
Table 69. Value Parameter Values that Support Index Constant cbExtChooseFore
Adds the forecast in the selected cell to the list of chosen forecasts. Use cbChfChosen after this option. | ||
The following values are used with Index = cbExtPercentiles to specify percentile data for extraction.
The following values are used with Index = cbExtChooseAsm to specify assumption data for extraction.
Table 71. Value Parameter Values that Support Index Constant cbExtChooseAsm
Includes chosen assumptions. Run this option after adding assumptions. | ||
Adds the assumption in the selected cell to the chosen assumptions. Use cbChaChosen after this option. | ||
The following values are used with Index = cbExtStartSheet to specify whether data should be extracted to a new or existing workbook and worksheet.
Calling ExtractDataND with cbExtStartSheet will overwrite any settings made with cbExtExistingSheet. |
Table 72. Value Parameter Values that Support Index Constant cbExtStartSheet
The following values are used with Index = cbExtDataOptimizerType to specify which optimizer data should be extracted to the specified location. A third boolean value, True or False, is used to activate or deactivate the preceding entries.
The following values are used with Index = cbExtChooseDecVar to specify decision variable data for extraction. If not specified, the current setting from the Extract Data dialog is used.
Table 74. Value Parameter Values that Support Index Constant cbExtChooseDecVar
Adds the forecast in the selected cell to the list of chosen forecasts. Use cbChooseDecVarChosen after this option. | ||
Run a simulation before you call CB.ExtractDataND. Extraction of data from restored results is not supported.
See the Oracle Crystal Ball User's Guide for more information on extracting data.