Migrating an STK 7 Engine Application to STK 8

Major releases of AGI applications can run side-by side, STK 7 and STK 8 can be running at the same time on the same machine. In order to achieve this functionality, different GUIDs, ProgIDs, type libraries, and namespaces are created for each major release. In order to use the latest type libraries and components, you must migrate your custom application to the latest major release by updating or replacing GUIDs, ProgIDs, and other components from previous major releases.

The following tells you how to migrate your STK Engine Application created with one of the listed technologies from STK 7 to STK 8:

The instructions below show how to migrate projects using the STK Object Model. They do not show how to migrate your STK X references. Click here for instructions on how to migrate your STK X projects to the current version of STK.

Please refer to this listing if the instructions prompt you to replace an existing GUID:

STK 7.x GUID

STK 8.0 GUID

4351D2A1-E084-44B4-9984-F03A826C949F

A70C64A7-5B2D-4900-A334-CE6E3E96E766

Migrating a .NET (C# or Visual Basic) Project to STK 8

  1. Perform all steps described in Migrating Your STK X Project (if applicable). Do not perform the last step yet.
  2. Locate your project directory. Open your .csproj or .vbproj file in a text editor.
  3. Locate AGI.STKObjects Reference. From there, locate and replace the previous GUID with the current GUID according to the above table. Save your changes to the .csproj or .vbproj file and close the text editor.
  4. Open your project in Visual Studios. Compile and run your project.

Migrating a Visual Basic 6 Project to STK 8

  1. Perform all steps described in Migrating Your STK X Project (if applicable). Do not perform the last step yet.
  2. Locate your project directory. Open your .vbp file in a text editor.
  3. Locate and replace the existing STK Objects reference GUID with the most current STK Objects GUID. Save your changes to the .vbp file and close the text editor.
  4. Open your project in the Visual Basic IDE. Run your project.

Migrating a Managed C++ Project to STK 8

  1. Perform all steps described in Migrating Your STK X Project (if applicable). Do not perform the last step yet.
  2. Open your project in Visual Studios. Go to the Solution explorer and expand the project icon. Locate and right-click on References, then select Add Reference...
  3. Select the COM tab. Scroll down until you locate and double-click on AGI STK Objects 8. Click OK to close the dialog.
  4. Compile and run your application.

Migrating an MFC C++ Project to STK 8

  1. Perform all steps described in Migrating Your STK X Project (if applicable). Do not perform the last step yet.
  2. Open your .dsw file in Visual C++ 6.0. Open the Workspace window if it is not already visible and select the file tab.
  3. Select and remove agstkobjects.cpp and agsktobject.h from your project. Save all files in the Workspace and exit Visual C++.
  4. Locate your project directory and delete the agstkobjects.cpp and agstkobjects.h files. Open your .dsw file in Visual C++ 6.0 again.
  5. Open the ClassWizard (Ctrl + W by default) and go to the Automation tab. Click on Add Class and select From a type library… from the drop-down menu.
  6. Browse to your STK 8 install directory (e.g. C:\Program Files\AGI\STK 8), and then go to the bin directory. Locate and double-click on AgStkObjects.dll.
  7. From the list, locate and select all interfaces that you currently use directly in your project. Click OK to close the dialog. Click OK again to close the ClassWizard dialog.
  8. Find any and all import statements in your code that import DLLs from STK 7 and update the file path to point to the corresponding STK 8 DLL. For example:
  9. #import “C:\Program Files\AGI\STK 7\Bin\AgStkObjects.dll”
     
    Should become:
     
    #import “C:\Program Files\AGI\STK 8\bin\AgStkObjects.dll”
  10. Save all changes to your workspace. You may now compile and run your application.

Migrating a Java Project to STK 8

In order to migrate your Java application, you must generate the appropriate Java class files using J-Integra and the JDK.

Migrating a JavaScript or VBScript (late-bound) Project to STK 8

If your JavaScript or VBScript code is in an HTML file, then please disregard this set of instructions and see the set of following instructions.

  1. Open your .js or .vbs file in a text-editor.
  2. Replace all references to STK 7, such as GUIDs and ProgIDs, with their appropriate STK 8 counterparts.
  3. Save your changes and close your text editor.
  4. Run your .js or .vbs file as usual.

Instructions if your code is located inside of an HTML file:

  1. Perform all steps described in STK X Help->Migrating to the Current Version (if applicable). Do not perform the last step yet.
  2. Locate the <script> tag associated with the code that interacts with object model. Replace all references to STK 7, such as GUIDs and ProgIDs, with their appropriate STK 8 counterparts.
  3. Save your changes and close the text editor.
  4. Run your .html file as usual.

Migrating a VBA Project to STK 8

  1. Perform all steps described in STK X Help->Migrating to the Current Version (if applicable. Do not complete the last step yet.
  2. Locate and open your .ppt, .xls, or other file in its corresponding application. Open the VBA IDE by pressing Alt + F11.
  3. Select Tools from the menu and then select the References menu item.
  4. Deselect AGI STK Objects 7 if it already selected. Locate and select AGI STK Objects 8. Click OK to close the dialog box. Close the VBA IDE.
  5. Save your file.
  6. You may now view/use your file.

STK Programming Interface 11.0.1