Simulation & Probabilistic Analysis SDK
Add Distribution Fitting & Simulation Features to Your Applications

SPA SDK Help HomeLearn More About the SPA SDK

Getting Started

This topic covers the following issues to help you get started:

Code Examples

The SDK comes with code examples in a variety of programming languages, including Visual Basic for Applications, VB.NET, C#, C++.NET, and native C++. Please browse to the My Documents\SPA SDK\Examples folder, or select Programs\MathWave\SPA SDK\Examples from the Windows Start menu.

Registering the SDK on Your System

The core of the SPA SDK is the COM library file SPA_SDK.dll. The SDK installer will try to automatically register the library on your system, however, if it fails for some reason, run the following command from the command prompt:

  regsvr32 "C:\Program Files\MathWave\SPA SDK\Lib\SPA_SDK.dll"
  

Referencing the SDK in Your Projects

Depending on the development environment you are using, you need to add a reference to the SDK before you can use it in your projects.

Visual Basic for Applications

In the VBA editor window, choose the Tools|References menu option, locate and enable the "Simulation & Probabilistic Analysis SDK" check box, then click OK.

VB.NET / C# / C++.NET

Even though Microsoft Visual Studio allows to automatically generate primary interop assemblies (PIA) based on the COM modules, you should use the PIA file provided with the SDK: select Project|Add Reference from the main menu, locate "MathWave.SPA_SDK.PIA", and click OK.

Native (Unmanaged) C++

Include the SPA_SDK.h header file provided with the SDK:

  #include "C:\Program Files\MathWave\SPA SDK\Include\SPA_SDK.h"  // specify the correct path to the header file
  

Alternatively, you can add the following line to your code, forcing the compiler to automatically generate the header file from the SPA_SDK.dll file:

  #import "C:\Program Files\MathWave\SPA SDK\Lib\SPA_SDK.dll"
  

Initializing the SDK

The functionality of the SPA SDK is availabe through a number of objects that can be used in your applications. The initial steps you must take before using the features provided by the SDK are as follows:

  1. Create a SPAApplication object.
  2. [Optional step] If you need to supply the license details to the SDK, call the SPAApplication.Register method.
  3. [Optional step] To avoid the SDK displaying any messages when using the Evaluation License, use the SPAApplication.TrialDaysLeft property.
  4. Call the SPAApplication.Initialize method.

Using the Constants

The SPAConst class is also worth a special mention, since instead of performing any specific tasks, it works as a storage for constants that can be passed to the other object member functions. For details. please refer to the documentation on this class.

Localization Support

The SDK provides a basic localization support: the SPAApplication.Language property controls the language used for displaying graph labels and titles.

Example

Sub Test()
  SPAApplication.Initialize
  SPAApplication.Language = SPALangGerman
  SPAApplication.GraphOptions.LineQuality = SPAConst.LineQualityVeryHigh
End Sub
  
Copyright © MathWave Technologies
www.mathwave.com