Migrating an STK 10 Engine Application to STK 11
Major releases of AGI applications can run side by side (for
example, STK 10 and STK 11 can be running at the same time on the
same machine). In order to have this functionality, different
GUIDs, ProgIDs, type libraries, and namespaces are created for each
major release. What does this mean for your STK Engine Application?
It means that STK Engine Applications are targeted specifically for
a major release, and you need to make minimal code changes to your
application to migrate to STK 11.
Note: An STK X license is required to run an STK 11
Engine Application.
For information on migrating between previous versions of STK
see:
The following tells you how to migrate your STK X project
created in one of the following languages or applications from STK
10 to STK 11:
If you run into compile time issues after migrating the desired
project using the instructions below, please refer to the
appropriate tables from the STK 10 to STK
11 Migration Mapping Tables help topic for the new replacement
types.
Migrating a C# Visual Studio Project to STK
11
- Locate and delete \bin and \obj folders from your project.
- Open your project (.csproj) file in a text editor.
- Locate the COMReference sections in the project file
for the AGI.STKX, AxAGI.STKX,
AGI.STKUtil, and AGI.STKObjects sections.
- Replace the Guid entry in the AGI.STKX,
AxAGI.STKX, AGI.STKUtil, AGI.STKVgt,
AGI.STKGraphics and AGI.STKObject
sections with the new GUID from the GUIDs Mapping Table. The GUIDs below are
for a stand alone STK application. If you are building an UI Plugin
application, see the GUIDs Mapping table for the correct GUIDs.
Old GUID =>
2F33DBAC-FD48-4355-B4B1-0B06104F704B
New GUID => BEF246AB-FA35-44BB-BEE8-01928B41E9A6
Old GUID =>
10F7F37B-ED54-429D-8671-7D120F8ED8ED
New GUID => 00DD7BD4-53D5-4870-996B-8ADB8AF904FA
Old GUID =>
7F21C33A-CB6A-4F9A-91AE-AC80A9820094
New GUID => D6A1725B-89FF-43A4-995B-7F055549F4EB
Old GUID =>
5ABDA9FD-E655-4531-8C88-FDE33D087C85
New GUID => 8B49F426-4BF0-49F7-A59B-93961D83CB5D
Old GUID =>
5ABDA9FD-E655-4531-8C88-FDE33D087C85
New GUID => 8B49F426-4BF0-49F7-A59B-93961D83CB5D
Old GUID =>
45404AAB-1DCF-433A-A66C-B56C9C242E02
New GUID =>
42D2781B-8A06-4DB2-9969-72D6ABF01A72
- Save the project file.
- Start Visual Studio .NET and open your project.
- Search and replace all the enumerations used (if any) in your
code (.cs) files from the Enumerations Mapping Table.
- Search and replace all the ProgIDs used (if any) in your code
(.cs) files from the ProgIDs
Mapping Table.
- Save your code files.
- Compile and run your project.
- Locate and delete \bin and \obj folders in your project.
- Open your project (.vbproj) file in a text editor.
- Locate the COMReference sections in the project file
for the AGI.STKX, AxAGI.STKX,
AGI.STKUtil and AGI.STKObjects sections.
- Replace the Guid entry in the AGI.STKX,
AxAGI.STKX, AGI.STKUtil, AGI.STKVgt,
AGI.STKGraphics, and AGI.STKObject sections
with the new GUID from the GUIDs
Mapping Table.
Old GUID =>
2F33DBAC-FD48-4355-B4B1-0B06104F704B
New GUID => BEF246AB-FA35-44BB-BEE8-01928B41E9A6
Old GUID =>
10F7F37B-ED54-429D-8671-7D120F8ED8ED
New GUID => 00DD7BD4-53D5-4870-996B-8ADB8AF904FA
Old GUID =>
7F21C33A-CB6A-4F9A-91AE-AC80A9820094
New GUID => D6A1725B-89FF-43A4-995B-7F055549F4EB
Old GUID =>
5ABDA9FD-E655-4531-8C88-FDE33D087C85
New GUID => 8B49F426-4BF0-49F7-A59B-93961D83CB5D
Old GUID =>
5ABDA9FD-E655-4531-8C88-FDE33D087C85
New GUID => 8B49F426-4BF0-49F7-A59B-93961D83CB5D
Old GUID =>
45404AAB-1DCF-433A-A66C-B56C9C242E02
New GUID =>
42D2781B-8A06-4DB2-9969-72D6ABF01A72
- Save the project file.
- Start Visual Studio .NET and open your project.
- Search and replace all the enumerations used (if any) in your
code (.vb) files from the Enumerations Mapping Table.
- Search and replace all the ProgIDs used (if any) in your code
(.vb) files from ProgIDs Mapping
Table.
- Save your code files.
- Compile and run your project.
- Launch MS PowerPoint and open your file.
- Locate the slide which contains the AGI Globe Control, AGI Map
Control, and/or AGI Graphics Analysis Control.
- Delete those controls.
- Save your presentation file, exit PowerPoint and restart
it.
- Launch Visual basic for Applications IDE by pressing Alt +
F11.
- Select Tools from the menu and then select
References.
- Clear the references to AGI STK X 10, AGI STK Util
10 and AGI STK Objects 10 in the
references dialog box, if present.
- Save your presentation file.
- Close MS PowerPoint.
- Locate and delete the temporary cache directory where
PowerPoint keeps type library caches. It is usually under the
logged-in-user's temporary directory. For example, for MS
PowerPoint 2010, it may be as follows:
\Users\UserName\AppData\Local\Temp\PPT11.0.
- Launch MS PowerPoint and open the previously saved presentation
file.
- Locate the slide where you want to insert the AGI Globe
Control, AGI Map Control and/or AGI Graphics Analysis Control.
- Click on the Developer tab on the ribbon.
- Click the More Controls button on the Control Toolbox
and select the AGI Globe Control 11, AGI Map Control
11 and/or AGI Graphics Analysis Control 11, and
insert your slide.
- Launch Visual basic for Applications IDE by pressing Alt +
F11.
- Select Tools from the menu and then select the
References menu item.
- Locate and select AGI STK Util 11, AGI STK X
11, and AGI STK Objects 11 if they are not already
selected.
- Click OK to close the dialog box.
- Save your presentation file.
- Run your presentation.
- Launch MS Excel and open your file.
- Locate the sheet which contains the AGI Globe Control, AGI Map
Control, and/or AGI Graphics Analysis Control.
- Delete those controls.
- Save your file.
- Launch Visual basic for Applications IDE by pressing Alt +
F11.
- Select Tools from the menu and then select the
References menu item.
- Remove the references to AGI STK X 10, AGI STK
Util 10 and/or AGI STK Objects 10 from the references
dialog box.
- Save your file.
- Close MS Excel.
- Locate and delete the temporary cache directory where Excel
keeps type library caches. It is usually under the logged-in-user's
temporary directory. For example, for MS Excel 2010, it may be as
follows:
\Users\UserName\AppData\Local\Temp\Excel8.0
- Launch MS Excel and open the previously saved Excel file.
- Locate the sheet where you want to insert the AGI Globe
Control.
- Click on the Developer tab on the ribbon.
- Click on the More Controls button on Control Toolbox
and select the AGI Globe Control 11, AGI Map Control
11 or AGI Graphics Analysis Control 11, and insert
your slide.
- Launch Visual basic for Applications IDE by pressing Alt + F11
keys.
- Select Tools from the menu and then select the
References menu item.
- Locate and select AGI STK X 11, AGI STK Util
11 , and AGI STK Objects 11 if they are not
already.
- Click OK to close the dialog box.
- Open your HTML file in a text editor or an HTML editor of your
choice.
- Search and replace STK 10.x GUIDs found in your HTML file with
the new GUIDs for STK 11 from the GUIDs Mapping Table.
-
Old GUID =>
2F33DBAC-FD48-4355-B4B1-0B06104F704B
New GUID => BEF246AB-FA35-44BB-BEE8-01928B41E9A6
Old GUID =>
10F7F37B-ED54-429D-8671-7D120F8ED8ED
New GUID => 00DD7BD4-53D5-4870-996B-8ADB8AF904FA
Old GUID =>
7F21C33A-CB6A-4F9A-91AE-AC80A9820094
New GUID => D6A1725B-89FF-43A4-995B-7F055549F4EB
- Save the HTML file.
- Launch your HTML file in Internet Explorer.
- Start MATLAB.
- Open your existing figure in GUIDE.
- Remove the AGI STK X Map and Globe controls from your figure.
Note the tag associated with each control (for instance, activex1
for the map control and activex2 for the globe control).
- Save the project.
- Close and re-open MATLAB.
- Re-open your figure in GUIDE.
- Re-insert the new controls. Make sure you select the following
two controls:
- AGI STK X Map Control 11
- AGI STK X Globe Control 11
Note: MATLAB associates a new tag with the
controls. Therefore, if you had two active X controls on your
figure, what was activex1 becomes activex3, what was activex2
becomes activex4, etc.
For the remaining steps of these
instructions, the total number of active X controls on your form is
referred to as <m>.
- Open the M-file editor.
- In your M-files replace:
Existing string |
New string |
actxserver('STKX10.Application') |
actxserver('STKX11.Application') |
activex<n> for n = 1,2,3, ..., m |
activex<n+m> |
- If you are using a reference to the STK Object Model instance
in your code, then its ProgID needs to be updated as well. The
creation of an STK Object Model instance for STK 11 may look like
this:
OM = actxserver('AgStkObjects11.AgStkObjectRoot')
- Save your project.
- You are ready to use STK X version 11.
STK Programming Interface 11.0.1