Building Engine Plugins

Plugin components are built using Microsoft's COM technology, developed in the mid 1990s. It is the precursor technology to Microsoft's .NET framework. There are many books, courses, and online help pages concerning COM technology. All the sample code provided was built using Microsoft's Visual Studio 2019, Visual Studio 2017, and Visual Studio 2015.

It is best to use one of the samples provided as a guide. You can even modify the provided code to see how a feature will work. If you are unfamiliar with programming languages in general, then AGI recommends C# for the compiled code and JScript for the script code. While Visual Basic and VBScript were developed to make programming simple, C# and C++ based programmers may feel ill at ease with these languages.

Essentially, each plugin point defines a functional interface that the plugin component must implement. The plugin Help will identify the required methods. You must provide a method, even if the plugin does not use it.

Sample plugins

Sample plugins have been provided for each of the plugin points. See <STK install folder>\CodeSamples\Extend. Each sample has been programmed in several programming languages. A scenario demonstrating the use of the sample code has also been provided. In the sample code provided for the compiled languages, the build settings have been configured to automatically register the sample plugin component during the build. Windows script components are not compiled but still must be registered. The registration associates a GUID and ProgID defined by the component. You will need to build the compiled examples to see their use; you will need to register the windows script components to see their use. Refer to the Engine Plugin Registration help topic for more information. Moreover, for Python examples, you will need to install Python from activestate.com, which is available as a download from their web site for free.

In addition to registration in the windows registry, you must also register plugins with a plugin point in the hosting environment . This registration is done using XML registration files. Registration files are provided for all of the sample plugins in the sample code area. After registering a sample plugin, you need to copy the corresponding registration file to an appropriate folder. Refer to the registration topics for the various types of plugins.

Related topics:

You may also want to learn more about: