How to Migrate COM-based plugins to STK 9 from STK 8.1

For coding and project settings examples please refer to the STK plugin samples located in the <STK install folder>\CodeSamples\Extend directory.

Refer to Visual Studio .NET documentation for further details on the Visual Studio .NET project and source code details which are beyond the scope of this section.

Plugins Written in C# or VB .Net

  1. Copy your STK 8.1 plugin project and source code to a new directory location before making STK 9 changes. This will allow you to reuse your STK 8.1 plugin if you still have STK 8.1 installed alongside STK 9. It also provides a convenient reference for the original version of your plugin if the migration to STK 9 does not go as planned.


  2. Open your new STK 9 plugin project in Visual Studio .NET and update your project references. Refer to the Visual Studio .NET documentation for details on the "References" folder within a VS .NET project. To do this, you must remove the existing AGI.* references from the expanded references folder in your .NET plugin project.


  3. Save all changes of your project and source files.


  4. Compile the .NET plugin project and fix any compile and linking errors that may occur.


  5. Register your plugin with STK and with the Windows Registry.


  6. Exit Visual Studio .NET.

Plugins Written in C++

  1. Copy your STK 8 plugin project and source code to a new directory location before making STK 9 changes. This will allow you to reuse your STK 8 plugin if you still have STK 8 installed alongside STK 9. It also provides a convenient reference for the original version of your plugin if the migration to STK 9 does not go as planned.


  2. Open your project file (.vcproj) in Visual Studio .NET.


  3. Open your plugin project's properties page. Complete steps 4 through 8 for both Release and Debug Configurations.


  4. Navigate to the "C/C++" properties folder in the left navigation pane and select "General" from the submenu.


  5. Update the "Additional Include Directories" to replace the STK 8 installation binaries filepath with the STK 9 installation binaries filepath <STK install folder>\bin.( The default location for <STK install folder> is C:\Program Files\AGI\STK 9)


  6. Navigate to the "MIDL" properties folder in the left navigation pane and select "General" from the submenu.


  7. Update the "Additional Include Directories" to replace the STK 8 installation binaries filepath with the STK 9 installation binaries filepath <STK install folder>\bin.


  8. Click the Apply and OK buttons in the property pages.


  9. Open the .rgs file for your plugin's COM Object in a text editor.


  10. Locate the 'Implemented Categories' section and remove it from the file.


  11. Save all changes of your project and source files.


  12. Compile the C++ plugin project and fix any compile and linking errors that may occur.


  13. Register your plugin with STK and with the windows registry.


  14. Exit Visual Studio .NET.


Migrating Window Script Component ( WSC ) COM-based plugins

These plugins are typically written in VBScript, JavaScript, or another late-bound scripting language.

To use them with STK register your plugin with STK and with the windows registry

Plugin Registration

Compilation Changes/Fixes

For the following engine plugins types...

AccessConstraints
Gator.AttitudeControllers
Gator.EngineModels
Gator.Search
Hpop.ForceModels


...if you experience a compilation error while attempting to implement some plugin interface methods like Init(...), PrePropagate(...), PreNextStep(...), Evaluate(...), PostEvaluate(...), PostPropagate(...), etc. for a particular plugin type you may have to change the plugin site input parameter from their class versions to their interface versions. For instance...

In order to provide integration with other AGI COM libraries the following syntax/types have been changed to prevent name collisions:


STK 8.1 syntax STK 9.0 syntax
AgEFrame AgEUtFrame
AgEFrame.eFrameInertial AgEUtFrame.eUtFrameInertial
AgEFrame.eFrameFixed AgEUtFrame.eUtFrameFixed
AgEFrame.eFrameLVLH AgEUtFrame.eUtFrameLVLH
AgEFrame.eFrameNTC AgEUtFrame.eUtFrameNTC
AgETimeScale AgEUtTimeScale
AgETimeScale.eTimeScaleUTC AgEUtTimeScale.eUtTimeScaleUTC
AgETimeScale.eTimeScaleTAI AgEUtTimeScale.eUtTimeScaleTAI
AgETimeScale.eTimeScaleTDT AgEUtTimeScale.eUtTimeScaleTDT
AgETimeScale.eTimeScaleUT1 AgEUtTimeScale.eUtTimeScaleUT1
AgETimeScale.eTimeScaleSTKEpochSec AgEUtTimeScale.eUtTimeScaleSTKEpochSec
AgETimeScale.eTimeScaleTDB AgEUtTimeScale.eUtTimeScaleTDB
AgETimeScale.eTimeScaleGPS AgEUtTimeScale.eUtTimeScaleGPS
AgELogMsgType AgEUtLogMsgType
AgELogMsgType.eLogMsgDebug AgEUtLogMsgType.eUtLogMsgDebug
AgELogMsgType.eLogMsgInfo AgEUtLogMsgType.eUtLogMsgInfo
AgELogMsgType.eLogMsgForceInfo AgEUtLogMsgType.eUtLogMsgForceInfo
AgELogMsgType.eLogMsgWarning AgEUtLogMsgType.eUtLogMsgWarning
AgELogMsgType.eLogMsgAlarm AgEUtLogMsgType.eUtLogMsgAlarm
AgESunPosType AgEUtSunPosType
AgESunPosType.eSunPosTypeApparentToTrueCB AgEUtSunPosType.eUtSunPosTypeApparentToTrueCB
AgESunPosType.eSunPosTypeApparent AgEUtSunPosType.eUtSunPosTypeApparent
AgESunPosType.eSunPosTypeTrue AgEUtSunPosType.eUtSunPosTypeTrue
AgESunPosType.eSunPosTypeSRP AgEUtSunPosType.eUtSunPosTypeSRP

STK Programming Interface 11.0.1