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

  1. Locate and delete \bin and \obj folders from your project.
  2. Open your project (.csproj) file in a text editor.
  3. Locate the References section in the project file and look for the AGI.STKX and AxAGI.STKX sections.
  4. 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

  5. Save the project file.
  6. Start Visual Studio .NET and open your project.
  7. Search and replace all the enumerations used (if any) in your code (.cs) files from the Enumerations Mapping Table.
  8. Search and replace all the ProgIDs used (if any) in your code (.cs) files from the ProgIDs Mapping Table.
  9. Save your code files.
  10. Compile and run your project.

Migrating a VB.NET Project to STK 8

  1. Locate and delete \bin and \obj folders in your project.
  2. Open your project (.vbproj) file in a text editor.
  3. Locate the References section in the project file and look for the AGI.STKX and AxAGI.STKX sections.
  4. 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

  5. Save the project file.
  6. Start Visual Studio .NET and open your project.
  7. Search and replace all the enumerations used (if any) in your code (.vb) files from the Enumerations Mapping Table.
  8. Search and replace all the ProgIDs used (if any) in your code (.vb) files from ProgIDs Mapping Table.
  9. Save your code files.
  10. Compile and run your project.

Migrating a VB 6.0 Project to STK 8

  1. Open the .vbp and .frm files in your Visual Basic 6.0 project in a text editor.
  2. 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

  3. Save the modified files.
  4. Launch VB 6.0 IDE and open your project.
  5. From the menu, select Project and then References. The following dialog box is displayed.

  6. Select AGI STK Util 8 to include it as a reference in your project.
  7. Click OK and close the dialog box.
  8. Save your project.
  9. Compile your project.
  10. Run your application.

Migrating MS PowerPoint Presentations to STK 8

  1. Launch MS PowerPoint and open your file.
  2. Locate the slide which contains either the AGI Globe Control or AGI Map Control and delete those controls.
  3. Save your presentation file, exit PowerPoint and restart it.
  4. Launch Visual basic for Applications IDE by pressing Alt + F11.
  5. Select Tools from the menu and then select References.
  6. 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.
  7. Save your presentation file.
  8. Close MS PowerPoint.
  9. 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.
  10. Launch MS PowerPoint and open the previously saved presentation file.
  11. Locate the slide where you want to insert the AGI Globe Control.
  12. 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.
  13. Launch Visual basic for Applications IDE by pressing Alt + F11.
  14. Select Tools from the menu and then select the References menu item.
  15. Locate and select AGI STK Util 8 and AGI STK X if they are not already selected.
  16. Click OK to close the dialog box.
  17. Save your presentation file.
  18. Run your presentation.

Migrating MS Excel Files to STK 8

  1. Launch MS Excel and open your file.
  2. Locate the sheet that contains either the AGI Globe Control or AGI Map Control and delete those controls.
  3. Save your file.
  4. Launch Visual basic for Applications IDE by pressing Alt + F11.
  5. Select Tools from the menu and then select the References menu item.
  6. Remove AGI STK X 1.0 from the references dialog box.
  7. Save your file.
  8. Close MS Excel.
  9. 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
  10. Launch MS Excel and open the previously saved Excel file.
  11. Locate the sheet where you want to insert the AGI Globe Control.
  12. 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.
  13. Launch Visual basic for Applications IDE by pressing Alt + F11 keys.
  14. Select Tools from the menu and then select the References menu item.
  15. Locate and select AGI STK Util 8 .
  16. Click OK to close the dialog box.

Migrating Java Applications to STK X 8

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

  1. Open your HTML file in a text or HTML editor of your choice.
  2. 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

  3. Save the HTML file.
  4. Launch your HTML file in your browser.

Migrating VC++ 6.0 MFC Project to STK 8

  1. Locate and delete the \debug and \Release folders from your project.
  2. Launch Visual C++ 6.0 IDE and open your VC++ 6.0/MFC project.
  3. 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.
  4. Delete these files from your project.
  5. Invoke ClassWizard and then click the Member Variables tab.
  6. 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.
  7. Save changes to the project.
  8. Close the project.
  9. Locate your project folder in Windows Explorer.
  10. Open your project's resource (.rc) file in a text editor.
  11. 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

  12. 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.
  13. In your project folder locate and delete the application studio cache file (.aps) in your project.
  14. Launch Visual C++ 6.0 IDE and open your VC++ 6.0/MFC project.
  15. 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.
  16. You will also see a dialog box that will look similar to the one shown below. Click OK to generate the new MFC wrappers.

  17. 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)

  18. Search and replace all the ProgIDs used (if any) in your code (.h, .cpp) files from the ProgID Mapping Table.
  19. Save and compile your project.

Migrating Managed C++ Project to STK 8

  1. Locate and delete the \debug and \Release folders from your project.
  2. Open your project (.vcproj) file in a text editor.
  3. Locate the References section in your project.
  4. 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

  5. Save the project file.
  6. Start Visual Studio .NET and open your project.
  7. Select References in the Solution Explorer and click Add Reference, as shown below.

  8. 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.

  9. Search and replace all the enumerations used (if any) in your code (.h, .cpp) files from the Enumerations Mapping Table.
  10. Search and replace all the ProgIDs used (if any) in your code (.h, .cpp) files from the ProgID Mapping Table.
  11. Save your code files.
  12. Compile and run your project.

Migrating Matlab Project to STK 8.0

  1. Start Matlab.
  2. Open your existing figure in GUIDE.
  3. 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).
  4. Save the project.
  5. Close and re-open Matlab.
  6. Re-open your figure in GUIDE.
  7. 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>.

  8. Open the M-file editor.
  9. 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>

     
  10. Save your project.
  11. You are ready to use STK X version 8.

STK Programming Interface 11.0.1