Migrating an STK 8 Engine Application to STK 9
Major releases of AGI applications can run side by side (for
example, STK 8 and STK 9 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 9.
For information on migrating an STK 7 or STK 6 Engine
Application, see Migrating an STK 7
Engine Application to STK 8 or Migrating an STK 6 Engine Application to STK
7.
The following tells you how to migrate your STK X project
created in one of the following languages or applications from STK
8 to STK 9:
Migrating C# (VS 2005) Project to STK 9
- 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 and
AGI.STKObject sections with the new GUID from the GUIDs Mapping Table.
Old GUID =>
616F3ECD-11ED-42A6-BABC-E87C6D598731
New GUID => 138ABB54-1413-4E7C-BBC5-ED59403DEF47
Old GUID =>
6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
New GUID => 143176A1-6A8F-41AB-B9B4-C581BD51B350
Old GUID =>
A70C64A7-5B2D-4900-A334-CE6E3E96E766
New GUID =>
36A4EDB3-B021-4D44-A0AA-D1C897DC333D
- 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 and
AGI.STKObject sections with the new GUID from the GUIDs Mapping Table.
Old GUID =>
616F3ECD-11ED-42A6-BABC-E87C6D598731
New GUID => 138ABB54-1413-4E7C-BBC5-ED59403DEF47
Old GUID =>
6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
New GUID => 143176A1-6A8F-41AB-B9B4-C581BD51B350
Old GUID =>
A70C64A7-5B2D-4900-A334-CE6E3E96E766
New GUID =>
36A4EDB3-B021-4D44-A0AA-D1C897DC333D
- 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 8, AGI STK Util
8 and AGI STK Objects 8 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 2002, it may be as follows:
\Documents and Settings\UserName\Local
Settings\Temp\PPT10.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 the More Controls button on the Control Toolbox
and select the AGI Globe Control 9, AGI Map Control
9 and/or AGI Graphics Analysis Control 9, 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 9, AGI STK X
9, and AGI STK Objects 9 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 refreences to AGI STK X 8, AGI STK Util
8 and/or AGI STK Objects 8 from the references dialog
box.
- Save your file.
- Close MS Excel.
- 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 2002, it may be as follows:
\Documents and Settings\UserName\Local
Settings\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 More Controls button on Control Toolbox
and select the AGI Globe Control 9 , AGI Map Control
9 or AGI Graphics Analysis Control 9, a 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 9, AGI STK Util 9
, and AGI STK Objects 9 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 8.x GUIDs found in your HTML file with
the new GUIDs for STK 9.0 from the GUIDs Mapping Table.
-
Old GUID =>
616F3ECD-11ED-42A6-BABC-E87C6D598731
New GUID => 138ABB54-1413-4E7C-BBC5-ED59403DEF47
Old GUID =>
6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
New GUID => 143176A1-6A8F-41AB-B9B4-C581BD51B350
Old GUID =>
A70C64A7-5B2D-4900-A334-CE6E3E96E766
New GUID => 36A4EDB3-B021-4D44-A0AA-D1C897DC333D
- 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 (version 8) controls from
your figure. Note the tag associated with each control (for
instance, activex1 for the 2D 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 9
- AGI STK X Globe Control 8
Note: MATLAB associates a new tag with the
controls. So, if you had two active X controls on your figure, what
was activex1 becomes activex3, what was activex2 becomes activex4,
etc.
From this point, 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('STKX8.Application') |
actxserver('STKX9.Application') |
activex<n> for n = 1,2,3, ..., m |
Activex<n+m> |
- Save your project.
- You are ready to use STK X version 9.
STK Programming Interface 11.0.1