Crystal Ball-Developer-s-Guide-Release-11.pdf

Embed Size (px)

Citation preview

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    1/288

    O R A C L E C R Y S T A L B A L L , F U S I O N E D I T I O N

    R E L E A S E 11 . 1 . 2

    D E V E L O P E R ' S G U I D E

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    2/288

    Crystal Ball Developer's Guide, 11.1.2

    Copyright 1988, 2010, Oracle and/or its affiliates. All rights reserved.

    Authors: EPM Information Development Team

    This software and related documentation are provided under a license agreement containing restrictions on use anddisclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement orallowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit,perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilationof this software, unless required by law for interoperability, is prohibited. The information contained herein is subject tochange without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

    If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S.Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTS:Programs, software, databases, and related documentation and technical data delivered to U.S. Government customersare "commercial computer software" or "commercial technical data" pursuant to the applicable Federal AcquisitionRegulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, andadaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, tothe extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, CommercialComputer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

    This software is developed for general use in a variety of information management applications. It is not developed orintended for use in any inherently dangerous applications, including applications which may create a risk of personalinjury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe,backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliatesdisclaim any liability for any damages caused by use of this software in dangerous applications.

    Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of theirrespective owners.

    This software and documentation may provide access to or information on content, products, and services from thirdparties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with

    respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    3/288

    Contents

    Chapter 1. Welco me . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19About the Oracle Crystal Ball Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Who Should Use the Crystal Ball Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    What You Will Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20How This Manual is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Documentation Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Technical Support and More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    Chapter 2. Crystal Ball Developer Kit Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23How to Use the Crystal Ball Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    Calling Crystal Ball From Visual Basic For Application s (VBA) Programs . . . . . . . . . . 24

    Calling Crystal Ball From an External Visual Basic (VB) Program . . . . . . . . . . . . . . . . 25Creating a Micr osoft Excel Add-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Using Developer Kit Macro Calls in User-defined Macros . . . . . . . . . . . . . . . . . . . . . 26A Note About D efaults and Write-Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    Putting Custom Applications into Runtime Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Alphabetic List of Cr ystal Ball Macro Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 7Functions For U se in Microsoft Excel Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Opening and Cl osing Crystal Ball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    Setting Up and Running Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Controlling Crystal Ball Chart Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Managing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    Handling Crystal Ball Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Setting and Getting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    Crystal Ball Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Special Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    Chapter 3. Crysta l Ball Macro Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42CB.AboutBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    CB.AboutBox Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    Contents iii

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    4/288

    CB.AlertOnArgumentError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43CB.AlertOnArgumentError Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43CB.AlertOnArgumentError Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    CB.AlertOnMacroResultError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43CB.AlertOnMacroResultError Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44CB.AlertOnMacroResultError Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    CB.AlertOnObsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    CB.AlertOnObsolete Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44CB.AlertOnObsolete Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    CB.AssumPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    CB.AssumPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45CB.AutoDownshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    CB.AutoDownshift Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46CB.AutoDownshift Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    CB.BatchFit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46CB.BatchFit Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47CB.BatchFit Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    CB.BatchFitND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    CB.BatchFitND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53CB.BatchFitND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54CB.BatchFitND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    CB.Bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55CB.Bootstrap Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55CB.Bootstrap Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    CB.BootstrapND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    CB.BootstrapND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58CB.BootstrapND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58CB.BootstrapND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    CB.CBLoaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59CB.CBLoaded Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59CB.CBLoaded Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    CB.CellPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    CB.CellPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60CB.CellPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    CB.CellPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60CB.CellPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    CB.CellPrefsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62CB.ChartPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    CB.ChartPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

    iv Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    5/288

    CB.ChartPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63CB.ChartPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

    CB.ChartPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    CB.ChartPrefsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65CB.CheckData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    CB.CheckData Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66CB.CheckData Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

    CB.CheckDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67CB.CheckDataND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67CB.CheckDataND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

    CB.ClearData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68CB.ClearData Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68CB.ClearData Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    CB.ClearDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    CB.ClearDataND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69CB.ClearDataND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    CB.CloseAllCharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70CB.CloseAllCharts Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    CB.CloseAllCharts Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70CB.CloseChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    CB.CloseChart Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    CB.CloseChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71CB.CloseFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    CB.CloseFore Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71CB.CloseFore Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

    CB.CloseSensitiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72CB.CloseSensitiv Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72CB.CloseSensitiv Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

    CB.CloseTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73CB.CloseTrend Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73CB.CloseTrend Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    CB.CopyData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    CB.CopyData Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74CB.CopyData Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

    CB.CopyDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74CB.CopyDataND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

    CB.CopyDataND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75CB.CopyScatter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

    CB.CopyScatter Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

    Contents v

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    6/288

    CB.CopyScatter Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76CB.CopySensitiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

    CB.CopySensitiv Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

    CB.CopySensitiv Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76CB.CopyTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    CB.CopyTrend Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77CB.CopyTrend Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

    CB.CorrelateND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77CB.CorrelateND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78CB.CorrelateND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    CB.CorrelateND Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78CB.CorrelateND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    CB.CreateChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79CB.CreateChart Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    CB.CreateChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79CB.CreateRpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    CB.CreateRpt Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80CB.CreateRpt Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

    CB.CreateRptND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80CB.CreateRptND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88CB.CreateRptND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    CB.CreateRptND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89CB.DataAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    CB.DataAnalysis Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90CB.DataAnalysis Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

    CB.DataAnalysisND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90CB.DataAnalysisND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93CB.DataAnalysisND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    CB.DecisionTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94CB.DecisionTable Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94CB.DecisionTable Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    CB.DecisionTableND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    CB.DecisionTableND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96CB.DecisionTableND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

    CB.DefineAltParms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97CB.DefineAltParms Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

    CB.DefineAltParms Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99CB.DefineAltParms Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99CB.DefineAltParms Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    vi Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    7/288

    CB.DefineAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100CB.DefineAssum Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100CB.DefineAssum Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    CB.DefineAssum Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100CB.DefineAssumND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

    CB.DefineAssumND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104CB.DefineAssumND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

    Defining Custom Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104CB.DefineAssumND Custom Distribution Example . . . . . . . . . . . . . . . . . . . . . . . . 105CB.DefineAssumND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    CB.DefineAssumFromForeND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105CB.DefineAssumFromForeND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106CB.DefineAssumFromForeND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    CB.DefineDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    CB.DefineDecVar Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107CB.DefineDecVar Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    CB.DefineDecVarND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108CB.DefineDecVarND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

    CB.DefineDecVarND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109CB.DefineDecVarND Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110CB.DefineDecVarND Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

    CB.DefineDecVarND Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110CB.DefineDecVarND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    CB.DefineFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111CB.DefineFore Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    CB.DefineFore Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111CB.DefineForeND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    CB.DefineForeND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

    CB.DefineForeND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113CB.DeleteChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

    CB.DeleteChart Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113CB.DeleteChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

    CB.EnumAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114CB.EnumAssum Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114CB.EnumAssum Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

    CB.EnumChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

    CB.EnumChart Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115CB.EnumChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

    CB.EnumCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

    Contents vii

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    8/288

    CB.EnumCorrelation Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117CB.EnumCorrelation Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117CB.EnumCorrelation Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

    CB.EnumDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118CB.EnumDecVar Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118CB.EnumDecVar Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

    CB.EnumFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

    CB.EnumFore Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120CB.EnumFore Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

    CB.ExtractData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

    CB.ExtractData Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120CB.ExtractData Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

    CB.ExtractDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121CB.ExtractDataND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

    CB.ExtractDataND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127CB.ExtractDataND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

    CB.Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127CB.Fit Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

    CB.Fit Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130CB.Fit Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130CB.Fit Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    CB.Fit Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131CB.FormatPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

    CB.FormatPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132CB.FormatPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

    CB.FormatPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132CB.FormatPrefsND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133CB.FormatPrefsND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    CB.FormatPrefsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134CB.Freeze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    CB.Freeze Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134CB.Freeze Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

    CB.FreezeND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135CB.FreezeND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136CB.FreezeND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    CB.GetAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    CB.GetAssum Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138CB.GetAssum Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138CB.GetAssum Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

    viii Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    9/288

    CB.GetAssumPercent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138CB.GetAssumPercent Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139CB.GetAssumPercent Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

    CB.GetAssumPercent Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140CB.GetBatchFitOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

    CB.GetBatchFitOption Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142CB.GetBatchFitOption Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    CB.GetBatchFitOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143CB.GetBootstrapOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    CB.GetBootstrapOption Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

    CB.GetBootstrapOption Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144CB.GetBootstrapOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

    CB.GetCBAutoLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145CB.GetCBAutoLoad Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

    CB.GetCBAutoLoad Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145CB.GetCertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

    CB.GetCertainty Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146CB.GetCertainty Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

    CB.GetCertainty Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147CB.GetCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    CB.GetCorrelation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    CB.GetCorrelation Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148CB.GetDataAnalysisOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

    CB.GetDataAnalysisOption Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149CB.GetDataAnalysisOption Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

    CB.GetDataAnalysisOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149CB.GetDecisionTableOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

    CB.GetDecisionTableOption Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

    CB.GetDecisionTableOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151CB.GetDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    CB.GetDecVar Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152CB.GetDecVar Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

    CB.GetExcel2007ForegroundMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153CB.GetExcel2007ForegroundMode Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153CB.GetExcel2007ForegroundMode Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . 153

    CB.GetFitParm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

    CB.GetFitParm Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155CB.GetFitParm Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

    CB.GetFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

    Contents ix

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    10/288

    CB.GetFore Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157CB.GetFore Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    CB.GetForeData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    CB.GetForeData Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158CB.GetForeData Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    CB.GetForePercent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158CB.GetForePercent Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    CB.GetForePercent Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159CB.GetForePercent Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    CB.GetForeStat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

    CB.GetForeStat Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161CB.GetForeStat Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162CB.GetForeStat Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

    CB.GetLockFitParm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

    CB.GetLockFitParm Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163CB.GetLockFitParm Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

    CB.GetRunPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164CB.GetRunPrefs Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

    CB.GetRunPrefs Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164CB.GetRunPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

    CB.GetScenarioAnalysisOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

    CB.GetScenarioAnalysisOption Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166CB.GetScenarioAnalysisOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

    CB.GetTwoDSimulationOption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167CB.GetTwoDSimulationOption Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

    CB.GetTwoDSimulationOption Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169CB.GetTwoDSimulationOption Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

    CB.GetVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

    CB.GetVersion Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170CB.GetVersion Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

    CB.GetWorksheetVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171CB.GetWorksheetVersion Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

    CB.GetWorksheetVersion Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171CB.IsCBObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

    CB.IsCBObject Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172CB.IsCBObject Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

    CB.Iterations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172CB.Iterations Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173CB.Iterations Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

    x Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    11/288

    CB.Iterations Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173CB.LockFitParm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

    CB.LockFitParm Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

    CB.LockFitParm Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175CB.MacroResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

    CB.MacroResult Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175CB.MacroResult Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

    CB.MacroResultDetail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176CB.MacroResultDetail Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178CB.MacroResultDetail Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    CB.OpenChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178CB.OpenChart Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179CB.OpenChart Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179CB.OpenChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

    CB.OpenFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179CB.OpenFore Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180CB.OpenFore Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

    CB.OpenSelection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

    CB.OpenSelection Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180CB.OpenSelection Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

    CB.OpenSensitiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

    CB.OpenSensitiv Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181CB.OpenSensitiv Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

    CB.OpenTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181CB.OpenTrend Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    CB.OpenTrend Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182CB.PasteData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    CB.PasteData Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    CB.PasteData Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183CB.PasteData Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183CB.PasteData Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

    CB.Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

    CB.Reset Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184CB.Reset Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

    CB.ResetND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184CB.ResetND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

    CB.ResetND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185CB.RestoreResults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

    CB.RestoreResults Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

    Contents xi

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    12/288

    CB.RestoreResults Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185CB.RestoreResultsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

    CB.RestoreResultsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

    CB.RestoreResultsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186CB.RunPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

    CB.RunPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187CB.RunPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

    CB.RunPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187CB.RunPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190CB.RunPrefsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

    CB.RuntimeMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191CB.RuntimeMode Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191CB.RuntimeMode Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

    CB.SaveResults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    CB.SaveResults Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192CB.SaveResults Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    CB.SaveResultsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192CB.SaveResultsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

    CB.SaveResultsND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193CB.ScatterPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

    CB.ScatterPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

    CB.ScatterPrefs Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194CB.ScatterPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

    CB.ScatterPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196CB.ScatterPrefsND Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

    CB.ScenarioAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197CB.ScenarioAnalysis Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197CB.ScenarioAnalysis Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

    CB.ScenarioAnalysisND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198CB.ScenarioAnalysisND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200CB.ScenarioAnalysisND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    CB.SelectAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    CB.SelectAssum Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201CB.SelectAssum Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    CB.SelectChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201CB.SelectChart Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

    CB.SelectChart Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202CB.SelectDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

    CB.SelectDecVar Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

    xii Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    13/288

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    14/288

    CB.SimResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217CB.SimResult Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217CB.SimResult Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

    CB.Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218CB.Simulation Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219CB.Simulation Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219CB.Simulation Relate d Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

    CB.SingleStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219CB.SingleStep Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220CB.SingleStep Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

    CB.StartMultiSimul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220CB.StartMultiSimul Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221CB.StartMultiSimul Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

    CB.Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

    CB.Startup Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221CB.Startup Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

    CB.StopMultiSimul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222CB.StopMultiSimul Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

    CB.TrendPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222CB.TrendPrefs Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222CB.TrendPrefs Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

    CB.TrendPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223CB.TrendPrefsND Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225CB.TrendPrefsND Related Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

    CB.TwoDSimulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

    CB.TwoDSimulation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226CB.TwoDSimulation Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

    CB.TwoDSimulationND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

    CB.TwoDSimulationND Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229CB.TwoDSimulationND Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230CB.TwoDSimulationND Related Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

    CB.WorksheetProtection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

    CB.WorksheetProtection Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231CB.WorksheetProtection Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231CB.WorksheetProtection Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

    Chapter 4. Changes from Prev ious Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

    Added in Crysta l Ball 11.1. x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

    xiv Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    15/288

    Added in Crystal Ball 7.1 - 7.3.x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Not Included in This Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Changes to Existing Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

    CB.ND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237CB.AutoDownshift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CB.CellPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CB.ChartPrefsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

    CB.CheckData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CB.ClearData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CB.ClearDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

    CB.CloseFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CB.CloseSensitiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239CB.CloseTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239CB.CopyData and CB.CopyDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    CB.CorrelateND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239CB.CreateRpt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239CB.CreateRptND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239CB.DefineAltParms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

    CB.DefineAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241CB.DefineAssumND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241CB.DefineDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    CB.DefineDecVarND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242CB.DefineForeND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242CB.EnumAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242CB.EnumDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    CB.EnumFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242CB.ExtractDataND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243CB.Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

    CB.Freeze and CB.FreezeND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244CB.GetAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244CB.GetAssumPercent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244CB.GetCertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

    CB.GetCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245CB.GetDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245CB.GetFitParm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245CB.GetFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

    CB.GetForeStat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246CB.GetRunPrefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246CB.GetVersion, CB.GetWorksheetVersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

    Contents xv

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    16/288

    CB.IsCBObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246CB.OpenSensitiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246CB.OpenTrend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

    CB.PasteData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246CB.RunPref sND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247CB.SensPref sND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247CB.SetAssum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

    CB.SetDecVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248CB.SetFore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248CB.SimResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

    CB.Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249CB.StartMu ltiSimul . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249CB.TrendPr efsND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

    Other Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

    Charts Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

    Chapter 5. C rystal Ball Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Introductio n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251About Cryst al Ball Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

    Runtime Ex ample Workbo ok . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

    Delivering Cryst al Ball Runtime Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252Installation Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252System Requirements and .NE T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

    Licensing Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

    Startup Scri pts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Installing Cr ystal Ball Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Crystal Ball Runtime Lice nsing Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

    Appendix A. Using the OptQuest Developer K it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257About the OptQ uest Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    Who Should Use This K it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257What This K it Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258What You W ill Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

    OptQuest Devel oper Kit Use an d Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Specific Requirements for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258OptQuest D eveloper Kit Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

    Important O ptQuest Class es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Developing Opti mization Cod e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

    Developmen t Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262Developmen t Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

    xvi Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    17/288

    Coding an Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265User-defined Event Macros for Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

    User-defined Event Macro Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

    Using Events in VBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268Event Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269Constraints and Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271Global Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

    Appendix B. Using the Predictor Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273About the Predictor Developer Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

    Who Should Use This Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274What This Kit Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

    Developer Kit Use and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

    Specific Requirements for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274Predictor Developer Kit Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

    Important Predictor Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Developing Time-Series Forecasting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

    Contents xvii

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    18/288

    xviii Contents

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    19/288

    1Welcome

    In This Chapter

    About the Oracle Crystal Ball Developer Kit ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... .19Who Should Use the Crystal Ball Developer Kit. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ..20What You Will Need........................................................................................20How This Manual is Organized.... ...... ...... ..... ...... ..... ...... ...... ..... ...... ..... ...... ...... ....20

    Documentation Changes ...... ..... ..... ...... ..... ...... ..... ...... ...... ..... ...... ..... ...... ...... ....21 Technical Support and More. .. .. .. .. .. . .. .. .. .. . .. .. .. .. .. .. .. .. .. . .. .. .. .. . .. .. .. .. .. .. .. .. .. . .. .. .. .. . .21

    About the Oracle Crystal Ball Developer KitWelcome to the Developer Kit for Oracle Crystal Ball, Fusion Edition.

    Using the Crystal Ball Developer Kit, you can automate and control Crystal Ball simulationsfrom within a Visual Basic for Applications (VBA) program. This opens up a whole range of possibilities:

    l Running multiple simulations to test different sets of assumptions automatically

    l Integrating Crystal Ball with other software tools

    l Creating turnkey applications that shield users from program intricacies

    l Building custom reports or automate post-simulation analysis

    l Setting up specialized simulation environments

    The Developer Kit provides a link between Crystal Ball and your application. It consists of alibrary of macro calls (subroutine s and functions) that control many aspects of Crystal Ball. Eachcopy of Crystal Ball comes enabled to use the Developer Kit, so that programs you develop today can be run by other users as well.

    This kit is the key that unlocks th e programmability of Crystal Ball and guides you through the

    many calls available. In addition to the descriptions of the calls, or subroutines and functions,this manual contains examples that illustrate usage of the Developer Kit in several practicalapplications. You are encouraged to study these examples before starting out on your ownapplications. Should you need additional help, technical support is available with appropriatelicenses.

    If you have Oracle Crystal Ball Decision Optimizer, Fusion Edition, Appendix A, Using theOptQuest Developer Kit, describes how to automate OptQuest optimizations.

    About the Oracle Crystal Ball Developer Kit 19

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    20/288

    See Appendix B, Using the Predictor Developer Kit, for information about automating andcontrolling Predictor forecasting.

    Note: The Predictor Developer Kit described in this Developer's Guide is completely rewritten.Code written for CB Predictor in Crystal Ball versions earlier than 11.1.1.3.00 is notcompatible with the current version of Predictor or this Predictor Developer Kit.

    Who Should Use the Crystal Ball Developer KitThe Crystal Ball Developer Kit is appropriate for advanced users who want to automate repetitivespreadsheet analysis. This manual assumes that readers are familiar with Visual Basic forApplications and Crystal Ball.

    What You Will Need

    Crystal Ball runs on several versions of Microsoft Windows and Microsoft Excel. For a completelist of required hardware and software, see the Oracle Crystal Ball Installation and Licensing Guide.

    How This Manual is OrganizedThis manual contains descriptions of the Crystal Ball Developer Kit macro calls. It also discussesthe COM Developer Kit for OptQuest, Predictor, and Oracle Hyperion Smart View for Office,Fusion Edition integration.

    Each macro description includes a list of parameters and an example of the use of the relevantcalls.

    The manual includes the following additional chapters:

    l Chapter 2, Crystal Ball Developer Kit Overview

    Describes how to use the Crystal Ball Developer Kit and contains an alphabetical list of allCrystal Ball Developer Kit calls with summaries, plus tables of related calls.

    l Chapter 3, Crystal Ball Macro Calls

    Includes descriptions of all Crystal Ball Developer Kit calls in alphabetical order, withexamples.

    l Chapter 4, Changes from Previous VersionsInformation about changes since previous releases of Crystal Ball.

    l Chapter 5, Crystal Ball Runtime

    Information about creating applications for people who are not users of Crystal Ball.

    l Appendix A, Using the OptQuest Developer Kit

    20 Welcome

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    21/288

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    22/288

    22 Welcome

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    23/288

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    24/288

    How to Use the Crystal Ball Developer KitThis section discusses:

    l Calling Crystal Ball From Visual Basic For Applications (VBA) Programs

    l Calling Crystal Ball From an External Visual Basic (VB) Program

    Note that macros created with the Crystal Ball Developer Kit cannot be placed in spreadsheetcells, although some calls have equivalents (with names ending in FN) that can be used directly in models. For a list of these, see Functions For Use in Microsoft Excel Models on page 32 .

    Calling Crystal Ball From Visual Basic For Applications (VBA)ProgramsTo call Crystal Ball subroutines and functions from VBA programs, ensure that the followingconditions are true:

    l Crystal Ball must be running.l The VBA program must have a reference to Crystal Ball

    .

    To create a reference to Crystal Ball from your programs:

    1 Open your VBA program.

    In Microsoft Excel, for example, select Tools, then Macro, and then Visual Basic Editor.

    2 In the menu, select Tools, then References .

    3 Look in the Available References list for CBDevKit.

    l If the reference appears in the list, check it and click OK.

    l If the reference does not appear in the list, continue with step 4.

    4 To locate and load the code module, click Browse.

    5 Browse to the main Crystal Ball installation folder, by default:

    C:\Program Files\Oracle\Crystal Ball

    6 Change Files Of Type to Excel Files *.xls;*.xla).

    7 Double-click CBDevKit.xla.

    CBDevKit appears in the Available References list with a check in front of it.

    Note: If you upgraded from 2000.x (5.x) versions of the Crystal Ball Developer Kit, locatecb.xla in the Available References list and uncheck it.

    8 Click OK.

    CBDevKit appears as a project where you can access the CB module.

    24 Crystal Ball Developer Kit Overview

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    25/288

    Note: If you do not create a reference to CBDevKit.xla, Crystal Ball calls will not be accessiblefrom your VBA program.

    Calling Crystal Ball From an External Visual Basic (VB)ProgramUsing Crystal Ball from Visual Basic 4.0 or higher is somewhat more complicated than using itfrom Visual Basic for Applications.

    To access Crystal Ball calls, you must first get a reference to the Microsoft Excel applicationobject. To do this, run the following procedure before running Crystal Ball subroutines andfunctions:

    Private Sub LoadCB() On Error Resume Next Set XL = CreateObject("Excel.Application").Parent XL.Visible = True Set CB = XL.Workbooks("CBDevKit.xla").Modules("CB") If Not IsObject(CB) Then Set CB = XL.Workbooks.Open(filename:= _ "C:\Program Files\Oracle\Crystal Ball\CBDevKit.xla")End IfEnd Sub

    If you have stored the file CBDevKit.xla in some other directory than C:\Program Files\Oracle\..., then substitute the appropriate path name.

    This procedure gets a reference to the Microsoft Excel application object and puts it into variableXL. Then this variable is used to determine if Crystal Ball is already loaded.

    If the Crystal Ball Developer Kit is not loaded, the procedure loads it.

    You cannot use Crystal Ball as an OLE automation object. You should call its subroutines andfunctions through a call to Microsoft Excels Run macro. The first parameter is the name of aCrystal Ball subroutine or function. Other parameters are passed to the specified Crystal Ballcall.

    For example the following call to CB.Simulation from a VBA module

    It is easy to translate code written in Visual Basic for Applications into Visual Basic code.

    CB.Simulation 1000, True

    can be replaced by the VB equivalent

    XL.Run "CB.Simulation", 1000, True

    Note: Crystal Ball subroutine and function names are case sensitive when called from outsideMicrosoft Excel. Be sure to capitalize the CB module name that prefixes the call names.In all other respects, calling Crystal Ball from VB 4.0 is no different from calling it fromVBA.

    How to Use the Crystal Ball Developer Kit 25

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    26/288

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    27/288

    Your application can use any of the Crystal Ball features accessible through the Developer Kit.You can also include Predictor time-series analyses in your applications and users can runsimulations in Extreme speed, if it is available to them with Crystal Ball Decision Optimizer.

    For details, see Chapter 5, Crystal Ball Runtime .

    Alphabetic List of Crystal Ball Macro CallsNote: Full descrip tions are listed alphabeti cally in Chapter 3 in the indicated sections.

    Table 1 Alphabetic L ist of Crystal Ball Macro Cal ls

    Name Description

    CB.AboutBox on page 42 Displays information about Crystal Ball

    CB.AlertOnArgumentError on page 43 Displays a message when an argument error occurs

    CB.AlertOnMacroResultError on page 43 Displays a message when an execution error occurs

    CB.AlertOnObsolete on page 44 Displays a message when an obsolete call or constant is used

    CB.AssumPrefsND on page 45 Sets attributes of Crystal Ball assumptions

    CB.AutoDownshift on page 45 In Crystal Ball Decision Optimizer, determines whether to automatically downshiNormal speed or fail when a model is incompatible with Extreme speed

    CB.BatchFit on page 46 Launches the Batch Fit tool

    CB.BatchFitND on page 47 Runs the Batch Fit tool without displaying dialogs

    CB.Bootstrap on page 55 Launches the Bootstrap tool

    CB.BootstrapND on page 55 Runs the Bootstrap tool without displaying dialogs

    CB.CBLoaded on page 59 Indicates whether Crystal Ball is currently loaded within Microsoft Excel

    CB.CellPrefs on page 59 Sets attributes of Crystal Ball cells using a dialog

    CB.CellPrefsND on page 60 Sets attributes of Crystal Ball cells without using a dialog

    CB.ChartPrefs on page 62 Sets chart preferences for the selected forecast using a dialog

    CB.ChartPrefsND on page 63 Sets chart preferences for selected forecast without a dialog

    CB.CheckData on page 66 Checks Crystal Ball data cells for validity, initializes variables with dialogs in caserror

    CB.CheckDataND on page 67 Checks Crystal Ball data cells for validity, initializes variables without error promp

    CB.ClearData on page 68 Erases assumptions, decision variables, and forecasts from selected cells after prompting

    Alphabetic List of Crystal Ball Macro Calls 27

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    28/288

    Name Description

    CB.ClearDataND on page 69 Erases assumptions, decision variables, and forecasts from selected cells without prompting

    CB.CloseAllCharts on page 70 Closes all open chart windows; equivalent to Analyze, then Close All

    CB.CloseChart on page 70 Closes the selected chart of the given type

    CB.CloseFore on page 71 Closes the forecast chart

    CB.CloseSensitiv on page 72 Closes the selected sensitivity chart

    CB.CloseTrend on page 73 Closes the selected trend chart

    CB.CopyData on page 73 Copies Crystal Ball data in the specified range

    CB.CopyDataND on page 74 Copies selected assumptions, decision variables, or forecasts

    CB.CopyScatter on page 75 Copies the selected scatter chart to the clipboard

    CB.CopySensitiv on page 76 Copies the selected sensitivity chart to the clipboard

    CB.CopyTrend on page 77 Copies the selected trend chart to the clipboard

    CB.CorrelateND on page 77 Defines a correlation coefficient between two selected assumptions

    CB.CreateChart on page 79 Creates a new chart of the specified type with the optional name, if specified

    CB.CreateRpt on page 79 Creates a report from the current simulation and restored results, optimization (withan appropriate license), or time-series forecast using a dialog

    CB.CreateRptND on page 80 Sets report preferences and creates a report from the current simulation and restoredresults, optimization (with an appropriate license), or time-series forecast without adialog

    CB.DataAnalysis on page 89 Launches the Data Analysis tool

    CB.DataAnalysisND on page 90 Runs the Data Analysis tool without displaying dialogs

    CB.DecisionTable on page 94 Launches the Decision Table tool

    CB.DecisionTableND on page 94 Runs the Decision Table tool without displaying dialogs

    CB.DefineAltParms on page 97 Creates or changes an alternate parameter set

    CB.DefineAssum on page 100 Defines or changes assumptions in selected cells with a dialog

    CB.DefineAssumND on page 101 Defines or changes assumptions in selected cells without a dialog

    CB.DefineAssumFromForeND on page 105 Defines an assumption from a specified forecast without using a dialog

    CB.DefineDecVar on page 107 Defines or changes a decision variable in a selected cell using a dialog

    CB.DefineDecVarND on page 108 Defines or changes a decision variable in a selected cell without a dialog

    CB.DefineFore on page 111 Defines a forecast in a selected cell using a dialog

    28 Crystal Ball Developer Kit Overview

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    29/288

    Name Description

    CB.DefineForeND on page 111 Defines a forecast in a selected cell without a dialog

    CB.DeleteChart on page 113 Deletes a chart of the specified type and chart ID

    CB.EnumAssum on page 114 Enumerates assumption cells for all open workbooks

    CB.EnumChart on page 115 Returns the unique name of the next chart of the specified type

    CB.EnumCorrelation on page 116 Enumerates correlated assumptions and correlation values for all open workbook

    CB.EnumDecVar on page 118 Enumerates decision variable cells for all open workbooks

    CB.EnumFore on page 119 Enumerates forecast cells for all open workbooks

    CB.ExtractData on page 120 Extracts data from the current simulation and restored results, optimization (with aappropriate license), or time-series forecast using a dialog

    CB.ExtractDataND on page 121 Extracts data from the current simulation and restored results, optimization (with aappropriate license), or time-series forecast without a dialog

    CB.Fit on page 127 Fits a specific probability distribution to a range of data and returns information abothe fit

    CB.FormatPrefs on page 131 Opens the Chart Preferences dialog to set format preferences for the selected forecas

    CB.FormatPrefsND on page 132 Sets format preferences for the selected forecast without a dialog

    CB.Freeze on page 134 Defines which Crystal Ball data cells to hold to their spreadsheet values during asimulation using a dialog

    CB.FreezeND on page 135 Defines which Crystal Ball data cells to hold to their spreadsheet values during asimulation without a dialog

    CB.GetAssum on page 136 Retrieves information for a specific assumption cellCB.GetAssumPercent on page 138 Calculates the value of the specified assumption that corresponds to the specified

    percentile

    CB.GetBatchFitOption on page 140 Returns current settings for the Batch Fit tool

    CB.GetBootstrapOption on page 143 Returns current settings for the Bootstrap tool

    CB.GetCBAutoLoad on page 145 Returns the current Crystal Ball autoload setting that indicates whether Crystal Bis set to open whenever Microsoft Excel opens

    CB.GetCertainty on page 145 Calculates the certainty level (or probability) of achieving a forecast value at or smaller than a specific threshold

    CB.GetCorrelation on page 147 Returns the correlation between two assumption cells

    CB.GetDataAnalysisOption on page 148 Returns current settings for the Data Analysis tool

    CB.GetDecisionTableOption on page 150 Returns current settings for the Decision Table tool

    CB.GetDecVar on page 152 Retrieves information for a specific decision variable cell

    Alphabetic List of Crystal Ball Macro Calls 29

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    30/288

    Name Description

    CB.GetExcel2007ForegroundMode on page 153Returns the current Run Preferences foreground mode setting for Microsoft Excel2007 in Normal speed

    CB.GetFitParm on page 154 Returns the value of the specified distribution parameter for the last CB.Fit call

    CB.GetFore on page 155 Retrieves information for a specific forecast cell

    CB.GetForeData on page 157 Returns specified forecast data for a given trial

    CB.GetForePercent on page 158 Returns the value corresponding to a percentile for a specific forecast

    CB.GetForeStat on page 160 Returns statistics for a specific forecast cell

    CB.GetLockFitParm on page 162 Returns whether a distribution and, optionally, specific parameters have lockedvalues for fitting purposes

    CB.GetRunPrefs on page 164 Returns a Run Preferences setting

    CB.GetScenarioAnalysisOption on page 165 Returns current settings for the Scenario Analysis tool

    CB.GetTwoDSimulationOption on page 167 Returns current settings for the 2D Simulation tool

    CB.GetVersion on page 170 Returns the current Crystal Ball version as a full build number or version ID number

    CB.GetWorksheetVersion on page 171 Returns the Crystal Ball data version of the active or specified worksheet

    CB.IsCBObject on page 172 Tests if a worksheet or workbook contains Crystal Ball data

    CB.Iterations on page 172 Returns the number of trials run in a simulation

    CB.LockFitParm on page 173 Sets parameter locking for distributions and, optionally, specific parameters

    CB.MacroResult on page 175 Tells you if a Crystal Ball macro call worked correctly

    CB.MacroResultDetail on page 176 Similar to CB.MacroResult with additional error information

    CB.OpenChart on page 178 Opens the selected chart of the specified type

    CB.OpenFore on page 179 Opens a forecast window for the selected cell

    CB.OpenSelection on page 180 Opens all charts defined for cells in the selected range

    CB.OpenSensitiv on page 181 Opens the selected sensitivity chart

    CB.OpenTrend on page 181 Opens the selected trend chart

    CB.PasteData on page 182 Pastes assumptions, decision variables, or forecasts into selected cells

    CB.Reset on page 183 Resets the current simulation after prompting

    CB.ResetND on page 184 Resets the current simulation without confirmation

    CB.RestoreResults on page 185 Restores simulation results from a file using a dialog

    CB.RestoreResultsND on page 186 Restores simulation results from a file without a dialog

    30 Crystal Ball Developer Kit Overview

  • 8/10/2019 Crystal Ball-Developer-s-Guide-Release-11.pdf

    31/288

    Name Description

    CB.RunPrefs on page 186 Sets Crystal Ball run preferences using a dialog

    CB.RunPrefsND on page 187 Sets Crystal Ball run preferences without a dialog

    CB.RuntimeMode on page 191 Hides the Crystal Ball toolbar and menus

    CB.SaveResults on page 192 Saves current simulation results using a dialog

    CB.SaveResultsND on page 192 Saves current simulation results without a dialog

    CB.ScatterPrefs on page 193 Opens the Scatter Preferences dialog for the selected scatter chart

    CB.ScatterPrefsND on page 194 Sets preferences for the specified scatter chart

    CB.ScenarioAnalysis on page 197 Opens the Scenario Analysis tool wizard

    CB.ScenarioAnalysisND on page 198 Runs the Scenario Analysis tool without using dialogs

    CB.SelectAssum on page 201 Selects all assumptions in the current spreadsheet

    CB.SelectChart on page 201 Selects the chart with the specified chart ID

    CB.SelectDecVar on page 202 Selects all decision variables in the current spreadsheet

    CB.SelectFore on page 203 Selects all forecasts in the current spreadsheet

    CB.SensPrefs on page 203 Opens the Sensitivity Preferences dialog for the selected sensitivity chart

    CB.SensPrefsND on page 204 Sets preferences for the specified sensitivity chart

    CB.SetAssum on page 206 Changes certain attributes for the assumption in a cell

    CB.SetCBAutoLoad on page 207 Sets or cancels autoloading with Microsoft Excel; determines whether Crystal Ba

    set to open whenever Microsoft Excel opensCB.SetCBWorkbookPriority on page 208 Sets the running order for macro applications when multiple workbooks are open

    CB.SetDecVar on page 208 Changes certain attributes for a decision variable

    CB.SetExcel2007ForegroundMode on page 210Sets the Run Preferences foreground mode setting for Microsoft Excel 2007 in Normspeed

    CB.SetFitRange on page 211 Specifies the data range to be used as input for CB.Fit

    CB.SetFore on page 212 Changes the settings for a forecast

    CB.SetRange on page 215 Sets the certainty range for one or all forecasts

    CB.Shutdown on page 216 Closes Crystal Ball while leaving Microsoft Excel open

    CB.SimResult on page 217 Returns criteria that stopped the last simulatio