Initialize
Initialize the calibration library using the specified INI configuration file. Initialization also loads and verifies that the license file is valid. The license file should be in the same directory as the library DLL file.
Parameters:
configFilename
The name of the configuration file to initialize with.
Return Value:
True on Success. If the function fails use GetErrorMessage to get the specific errors associated with the failure.
Interface Signature:
bool Initialize(string configFilename);
An example of how this function could be used is shown below.
using System;
namespace Example
{
/// <summary>
/// An simple example of how to utilize the API and get a reference to it
/// </summary>
public class ExampleClass
{
/// <summary>
/// Run a calibration
/// </summary>
public static bool Calibrate(string calName, string pnaName)
{
// Get a reference to the API interface
AteSystems.InCal.IApi api = AteSystems.InCal.API.GetInterface();
bool success = api.Initialize(@"C:\Temp\MyConfig.ini");
if(success)
{
api.CatchExceptions = true;
// Call the API function
return api.Calibrate(calName, pnaName);
}
}
}
}