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
- Perform all steps described in Migrating Your STK X Project (if applicable).
Do not perform the last step yet.
- Locate your project directory. Open your .csproj or .vbproj
file in a text editor.
- 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.
- Open your project in Visual Studios. Compile and run your
project.
Migrating a Visual Basic 6
Project to STK 8
- Perform all steps described in Migrating Your STK X Project (if applicable).
Do not perform the last step yet.
- Locate your project directory. Open your .vbp file in a text
editor.
- 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.
- Open your project in the Visual Basic IDE. Run your
project.
Migrating a Managed C++ Project to
STK 8
- Perform all steps described in Migrating Your STK X Project (if applicable).
Do not perform the last step yet.
- 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...
- Select the COM tab. Scroll down until you
locate and double-click on AGI STK Objects 8.
Click OK to close the dialog.
- Compile and run your application.
Migrating an MFC C++ Project to
STK 8
- Perform all steps described in Migrating Your STK X Project (if applicable).
Do not perform the last step yet.
- Open your .dsw file in Visual C++ 6.0. Open the Workspace
window if it is not already visible and select the file tab.
- Select and remove agstkobjects.cpp and agsktobject.h from your
project. Save all files in the Workspace and exit Visual C++.
- Locate your project directory and delete the agstkobjects.cpp
and agstkobjects.h files. Open your .dsw file in Visual C++ 6.0
again.
- 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.
- 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.
- 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.
- 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:
-
#import “C:\Program Files\AGI\STK
7\Bin\AgStkObjects.dll”
Should become:
#import “C:\Program Files\AGI\STK
8\bin\AgStkObjects.dll”
- 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.
- Open your .js or .vbs file in a text-editor.
- Replace all references to STK 7, such as GUIDs and ProgIDs,
with their appropriate STK 8 counterparts.
- Save your changes and close your text editor.
- Run your .js or .vbs file as usual.
Instructions if your code is located inside of an HTML file:
- Perform all steps described in STK X Help->Migrating to the
Current Version (if applicable). Do not perform the last step
yet.
- 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.
- Save your changes and close the text editor.
- Run your .html file as usual.
Migrating a VBA Project to STK
8
- Perform all steps described in STK X Help->Migrating to the
Current Version (if applicable. Do not complete the last step
yet.
- Locate and open your .ppt, .xls, or other file in its
corresponding application. Open the VBA IDE by pressing Alt +
F11.
- Select Tools from the menu and then select the
References menu item.
- 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.
- Save your file.
- You may now view/use your file.
STK Programming Interface 11.0.1