Click or drag to resize
OTX-API User Documentation

Welcome to EMOTIVE OTX-API User Documentation

The OTX-API provides client applications with easy, fast and reliable access for browsing, editing and validating of OTX documents and/or PTX projects. Like in the Open Test Framework the user have access to each OTX object inside his own application without any restrictions.

Main Features

OTX-API supports programmers to browse, edit and/or validate OTX projects (PTX) or single OTX documents in its own application with the same features like the Open Test Framework. The API has the following features:

  • Browsing a PTX/OTX content to get packages, documents.

  • Adding/removing a package to/from a PTX/another package.

  • Adding/removing a document to/from a package.

  • Editing content of an existing document.

  • Adjustment of Project settings for various OTX Extensions like DiagCom, HMI, I18n, Logging and Quantities

  • Multi instance capable (Requirement: All underlying systems have to support multiple instances)

  • Long time running stable

  • High runtime performance

First steps
  • At first, you have to install the OTX-API. The OTX-API is included in the MSI/MSM installer projects of the OTF and the OTX-Runtime, see Download area of EMOTIVE.

  • To use OTX-API, add Emotive.Otx.Api.dll as a reference in your project.

  • The ProjectManager is the entry point of the OTX-API.

  • You can download a full code example for MS Visual Studio here. To run the sample, you have to change the wrong reference of Emotive.Otx.Api.dll to the installation location of the OTX-API.

Example
Add a new package to an existing ptx. After that, add a new document to that package.
C#
static class Program
{
  static void Main()
  {
    ProjectManager projectManager = new ProjectManager("C:\\Sample.ptx");
    Package package = new Package("NewPackage1");
    projectManager.Project.AddPackage(package);
    Document document = new Document("Document1");
    document.Package.package = "NewPackage1";
    package.AddDocument(document);
    projectManager.Save();
  }
}
See Also

Reference

ProjectManager