Migrating Your STK X Project From STK 7 to STK 8
The following tells you how to migrate your STK X project
created in one of the following languages or applications from STK
7 to STK 8:
Migrating C# Project to STK 8
- Locate and delete \bin and \obj folders from your project.
- Open your project (.csproj) file in a text editor.
- Locate the References section in the project file and
look for the AGI.STKX and AxAGI.STKX
sections.
- Replace the Guid entry in the AGI.STKX and
AxAGI.STKX sections with the new GUID from the GUIDs Mapping Table.
Old GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
New GUID => 616F3ECD-11ED-42A6-BABC-E87C6D598731
And
Old GUID => F6463DFA-653B-4AAC-8271-2B83A99DFFD7
New GUID => 6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
- 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 References section in the project file and
look for the AGI.STKX and AxAGI.STKX
sections.
- Replace the Guid entry in the AGI.STKX and
AxAGI.STKX sections with the new GUID from the GUIDs Mapping Table.
Old GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
New GUID => 616F3ECD-11ED-42A6-BABC-E87C6D598731
And
Old GUID => F6463DFA-653B-4AAC-8271-2B83A99DFFD7
New GUID => 6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
- 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.
- Open the .vbp and .frm files in your Visual Basic 6.0 project
in a text editor.
- Search and replace STK 7.x GUIDs found in these files with the
new GUIDs for STK 8 from the GUIDs
Mapping Table.
Old GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
New GUID => 616F3ECD-11ED-42A6-BABC-E87C6D598731
And
Old GUID => F6463DFA-653B-4AAC-8271-2B83A99DFFD7
New GUID => 6A7E4FF4-C722-41B0-9551-B9CFB750E9C3
- Save the modified files.
- Launch VB 6.0 IDE and open your project.
- From the menu, select Project and then
References. The following dialog box is displayed.
- Select AGI STK Util 8 to include it as a reference in
your project.
- Click OK and close the dialog box.
- Save your project.
- Compile your project.
- Run your application.
- Launch MS PowerPoint and open your file.
- Locate the slide which contains either the AGI Globe Control or
AGI Map Control and 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 1.0, AGI STK Util
7 and AGI STK X 7 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.
- Click the More Controls button
on the Control Toolbox and select the AGI Globe Control 8
or AGI Map Control 8, 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 8 and AGI STK
X 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 that contains either the AGI Globe Control or
AGI Map Control and 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 AGI STK X 1.0 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
8 or AGI Map Control 8 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 Util 8 .
- Click OK to close the dialog
box.
Refer to
Java using J-integra for a complete step by step process for
creating a new STKX version 8 Java Application.
Notice Concerning Abnormal Exit During Large Operations (e.g.
multiple aircraft):
If your Java application exits without warning in the middle of
a series of large operations, such as creating many aircraft, then
consider adjusting your Stack size per thread
option when invoking your application. You can do so by specifying
-Xss<size>, where <size> is the stack size per thread in bytes.
For example, if you invoke the Java Virtual Machine (JVM) on the
command line like this:
java -Xss4096 MyClass
It invokes Java on MyClass with a
stack size per thread of 4096 bytes. You may have to experiment
with different values for the stack size per thread; if stack size
per thread is too high, the (JVM) may not be able to create the
main thread because it requires too much memory. If you specify too
low a stack size per thread, then you may encounter the same issue
that you encountered before.
Note that this only applies if you are using the STK X controls
in a COM single-threaded apartment by setting the JIntegra
Environment variables in your Java application as follows (See the
Java STKX tutorial for details on JIntegra enviroment variable
settings):
System.setProperty("JINTEGRA_NATIVE_MODE","");
System.setProperty("JINTEGRA_COINIT_VALUE","2");
Migrating HTML Pages to STK X
8
- Open your HTML file in a text or HTML editor of your
choice.
- Search and replace STK 7.x GUIDs found in your HTML file with
the new GUIDs for STK 8 from the GUIDs Mapping Table.
Old GUID => 0A82E9A8-0053-4E51-9182-64E6B5D6D0BC
New GUID =>DAD7DBE5-0842-4B28-AE16-51F0D80F08C2
Old GUID =>A53D65FF-9B14-4282-9A43-22A29323065F
New GUID => CAA1CD43-0DB8-4F60-94A6-453ABEE4DD86
Old GUID => 82CD1287-3DE1-4A3D-9227-8F2954F34C36
New GUID => F17BA94B-EFF8-4015-8229-76A0A7A0C9D3
- Save the HTML file.
- Launch your HTML file in your browser.
- Locate and delete the \debug and \Release folders from your
project.
- Launch Visual C++ 6.0 IDE and open your VC++ 6.0/MFC
project.
- In the Workspace window, identify all the previously generated
MFC wrapper class files for 4-DX controls. See MFC Wrappers Reference for a list of
ClassWizard-generated default names for these files.
- Delete these files from your project.
- Invoke ClassWizard and then click the Member Variables tab.
- Delete the member variables associated with AGI Globe and Map
controls. For example, in the dialog shown above these member
variables are m_2DControl and m_VOControl. Please make a note of
these member variables as you will need to add these later on.
- Save changes to the project.
- Close the project.
- Locate your project folder in Windows Explorer.
- Open your project's resource (.rc) file in a text editor.
- Look for any GUIDs that are found in the GUIDs Mapping Table and replace these
with the corresponding STK 8.0 GUIDs and save your file. The GUIDs
that are related to AGI Globe and AGI Map controls are:
Old GUID => 0A82E9A8-0053-4E51-9182-64E6B5D6D0BC
New GUID => DAD7DBE5-0842-4B28-AE16-51F0D80F08C2
Old GUID => A53D65FF-9B14-4282-9A43-22A29323065F
New GUID => CAA1CD43-0DB8-4F60-94A6-453ABEE4DD86
Old GUID => 82CD1287-3DE1-4A3D-9227-8F2954F34C36
New GUID => F17BA94B-EFF8-4015-8229-76A0A7A0C9D3
- In your project folder (located in the previous step), locate
and delete ClassWizard-generated MFC wrapper class files. See
MFC Wrappers Reference for a list
of ClassWizard-generated default names of these files.
- In your project folder locate and delete the application studio
cache file (.aps) in your project.
- Launch Visual C++ 6.0 IDE and open your VC++ 6.0/MFC
project.
- Invoke ClassWizard and then click the Member Variables tab and add the two member
variables back that you deleted previously in step 6. Click
OK.
- You will also see a dialog box that will look similar to the
one shown below. Click OK to
generate the new MFC wrappers.
- Optionally, if you synchronize STK X's Application object's
events, you will need to update the Object Event GUID as well:
Old GUID => 855A679E-F889-44CE-95E4-0B44A332D19F
New GUID => C0BEED7C-895C-4389-A845-4D3CD93B5BE5
(DIID_IAgSTKXApplicationEvents)
- Search and replace all the ProgIDs used (if any) in your code
(.h, .cpp) files from the ProgID
Mapping Table.
- Save and compile your project.
- Locate and delete the \debug and \Release folders from your
project.
- Open your project (.vcproj) file in a text editor.
- Locate the References section in your project.
- Replace the ControlGUID entries in these sections with the new
GUID from the GUIDs Mapping
Table.
Old GUID =>CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
New GUID => 616F3ECD-11ED-42A6-BABC-E87C6D598731
- Save the project file.
- Start Visual Studio .NET and open your project.
- Select References in the Solution Explorer and click
Add Reference, as shown below.
- In the Add References dialog box, click the COM tab
and scroll down to AGI STK X Util 8 . Double-click it and
then click OK, as shown below.
- Search and replace all the enumerations used (if any) in your
code (.h, .cpp) files from the Enumerations Mapping Table.
- Search and replace all the ProgIDs used (if any) in your code
(.h, .cpp) files from the ProgID
Mapping Table.
- Save your code files.
- Compile and run your project.
- Start Matlab.
- Open your existing figure in GUIDE.
- Remove the AGI STK X map and globe (version 7) 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 8
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('STKX7.Application') |
actxserver('STKX8.Application') |
activex<n> for n = 1,2,3, ..., m |
Activex<n+m> |
- Save your project.
- You are ready to use STK X version 8.
STK Programming Interface 11.0.1