v2.2
Renga API Documentation

Overview

Renga offers developers an API for extending the functionality of the system or integrating their software with Renga. Renga API uses the Microsoft COM technology to provide access to Renga's functionality, so you can create extensions using languages that support interoperation with COM, like Visual C# or Visual C++ or access Renga API from other applications. This page contains the list of main Renga API capabilities and describes the design of Renga's plugin system to help you create and run your own extensions.

What can I do with the Renga API?

The API is applicable to solving tasks of various problem domains, for example:

What do I need to use the Renga API?

The requirements to start using the API are as follows:

  • An installed copy of Renga Architecture or Renga Structure;
  • Renga Software Development Kit (download);
  • Microsoft Visual Studio. Sample projects were created in Visual Studio 2015, however you can use an older version.

Plugin system overview

Renga will only search for plugins in the `Plugins' sub-directory of Renga's installation directory. Each plugin should be placed into its own separate subdirectory.

A minimalistic plugin consists of:

  • plugin's binary file;
  • description file, with .rndesc filename extension.

Description file

The name of the description file should match the plugin's folder name, and its extension should be .rndesc.
For example, for a plugin located in [RengaInstallation]/Plugins/Sample folder, the description file should be [RengaInstallation]/Plugins/Sample/Sample.rndesc.

Binary file

The binary file is a regular Windows dynamic-link library (DLL) or a .NET assembly.

All plugins are loaded into the Renga process on application start and are unloaded on exit.

Description file contents

The plugin description file is an XML file providing information about the plugin. It has the following contents:

1 <RengaPlugin>
2  <Name>Sample Plugin</Name> <!-- Displayed plugin name -->
3  <Version>1.0</Version> <!-- Plugin version -->
4  <Copyright>Copyright text</Copyright> <!-- Copyright information -->
5  <RequiredAPIVersion>2.2</RequiredAPIVersion> <!-- Minimum required version of Renga API -->
6  <PluginType>net</PluginType> <!-- Plugin type. Use "net" for .NET (C#, C++/CLI) and "cpp" for Visual C++. Optional, defaults to "cpp" -->
7  <PluginFilename>Sample.dll</PluginFilename> <!-- Path to the plugin's binary file, either relative to the folder containing the .rndesc file or an absolute one -->
8  <Vendor>Renga</Vendor> <!-- Vendor of the plugin -->
9 </RengaPlugin>

How to create a new plugin in C#

In order to create your own plugin in C#, you need to create a new class library project in Microsoft Visual Studio first.

In the library, add a class implementing the Renga.IPlugin interface, either explicitly or implicitly.

The interface has two methods to implement:

  • bool Renga.IPlugin.Initialize(string pluginFolder), which is called on plugin initialization;
  • void Renga.IPlugin.Stop(), which is called when the plugin is being unloaded.

How to create a new plugin in C++

In order to create your own plugin in Visual C++, you need to create a new dynamic-link library (DLL) project in Microsoft Visual Studio first.

In the library, add a class implementing plugins::IPlugin. It has two methods to implement:

  • plugins::IPlugin::initialize(const wchar_t* pluginPath), which is called on plugin initialization;
  • plugins::IPlugin::stop(), which is called when the plugin is being unloaded.

Then add the EXPORT_PLUGIN(YourPluginClassName); macro after the plugin class declaration.

How to install the new plugin

After building your plugin you need to place it into the [Renga Installation directory]/Plugins/[PluginName] directory along with its description file, and the Renga.NET.PluginUtility.dll assembly (for .NET plugins). Do not forget other resources as well, in case your plugin depends on any.

Please see sample plugin implementations in [RengaCOMSDK dir]/Samples.

If some errors prevent the plugin from loading successfully, you can check the application log for details. The log is stored in %localappdata%/Renga Software/Renga Architecture/AecApp.log.

Get in touch

If you have any comments, questions or feature requests, please do not hesitate to contact us via conta.nosp@m.ct.a.nosp@m.pi@re.nosp@m.ngab.nosp@m.im.co.nosp@m.m or suppo.nosp@m.rt@r.nosp@m.engab.nosp@m.im.c.nosp@m.om.