Migrating an STK 6 Engine Application to STK 7

Major releases of AGI applications can run side by side (for example, STK 6 and STK 7 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 7.

The following tells you how to migrate your STK Engine Application created in one of the following languages or applications from STK 6 to STK 7:

Migrating C# Project to STK 7

  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.
  5. Old GUID => 2DB23B84-333C-4CAC-A79A-AAD2B9134A37
    New GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
  6. Save the project file.
  7. Start Visual Studio .NET and open your project.
  8. Search and replace all the enumerations used (if any) in your code (.cs) files from the Enumerations Mapping Table.
  9. Search and replace all the ProgIDs used (if any) in your code (.cs) files from the ProgIDs Mapping Table.
  10. Save your code files.
  11. Compile and run your project.

Migrating a VB.NET Project to STK 7

  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.
  5. Old GUID => 2DB23B84-333C-4CAC-A79A-AAD2B9134A37
    New GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
  6. Save the project file.
  7. Start Visual Studio .NET and open your project.
  8. Search and replace all the enumerations used (if any) in your code (.vb) files from the Enumerations Mapping Table.
  9. Search and replace all the ProgIDs used (if any) in your code (.vb) files from ProgIDs Mapping Table.
  10. Save your code files.
  11. Compile and run your project.

Migrating a VB 6.0 Project to STK 7

  1. Open the .vbp and .frm files in your Visual Basic 6.0 project in a text editor.
  2. Search and replace STK 6.x GUIDs found in these files with the new GUIDs for STK 7 from the GUIDs Mapping Table.
  3. Old GUID => 2DB23B84-333C-4CAC-A79A-AAD2B9134A37
    New GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD
  4. Save the modified files.
  5. Launch VB 6.0 IDE and open your project.
  6. From the menu, select Project and then References.
  7. Select AGI STK Util 7 to include it as a reference in your project.
  8. Click OK and close the dialog box.
  9. Save your project.
  10. Compile your project.
  11. Run your application.

Migrating HTML Pages to STK 7

  1. Open your HTML file in a text editor or an HTML editor of your choice.
  2. Search and replace STK 6.x GUIDs found in your HTML file with the new GUIDs for STK 7.0 from the GUIDs Mapping Table.
  3. Old GUID => 7EF7A5EB-E745-43A6-8432-224F4BC2CB1A
    New GUID => 0A82E9A8-0053-4E51-9182-64E6B5D6D0BC
     
    Old GUID => 64D485D5-E94B-4BB8-9460-E3145BEE0C88
    New GUID => A53D65FF-9B14-4282-9A43-22A29323065F

     
    Old GUID => 3126E55D-1A04-4317-951E-CA093BE716AF
    New GUID => 82CD1287-3DE1-4A3D-9227-8F2954F34C36
  4. Save the HTML file.
  5. Launch your HTML file in Internet Explorer.

Migrating MS PowerPoint Presentations to STK 7

  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 reference to AGI STK X 1.0 in the references dialog box.
  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:
  10. \Documents and Settings\UserName\Local Settings\Temp\PPT10.0.
  11. Launch MS PowerPoint and open the previously saved presentation file.
  12. Locate the slide where you want to insert the AGI Globe Control.
  13. Click the More Controls button on the Control Toolbox and select the AGI Globe Control 7 or AGI Map Control 7, and insert your slide.
  14. Launch Visual basic for Applications’ IDE by pressing Alt + F11.
  15. Select Tools from the menu and then select the References menu item.
  16. Locate and select AGI STK Util 7.
  17. Click OK to close the dialog box.
  18. In VBA IDE, search and replace any references to enumerations that may start with STKXLib with STKUtil. Refer to the Enumerations Mapping Table for all enumeration types.
  19. Save your presentation file.
  20. Run your presentation.

Migrating MS Excel Files to STK 7.0

  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:
  10. \Documents and Settings\UserName\Local Settings\Temp\Excel8.0
  11. Launch MS Excel and open the previously saved Excel file.
  12. Locate the sheet where you want to insert the AGI Globe Control.
  13. Click on the More Controls button on Control Toolbox and select the AGI Globe Control 7 or AGI Map Control 7, and insert your slide.
  14. Launch Visual basic for Applications’ IDE by pressing Alt + F11 keys.
  15. Select Tools from the menu and then select the References menu item.
  16. Locate and select AGI STK Util 7.
  17. Click OK to close the dialog box.

Migrating STK X version 6 Java Application to STK X version 7 Java Application

Refer to Java using J-integra for a complete step by step process for creating a new STKX version 7 Java Application.

STK X version 7 requires JIntegra to create Java wrappers files for an additional dll that was not in STK X version 6. When running JIntegra to produce your Java wrappers for STK X version 7, include the following two dlls in the same Java package (for example STK X):

Migrating VC++ 6.0 MFC Project to STK 7.0

  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 7.0 GUIDs and save your file. The two GUIDs that are related to AGI Globe and AGI Map controls are:
  12. Old GUID => 3126E55D-1A04-4317-951E-CA093BE716AF

    New GUID => 82CD1287-3DE1-4A3D-9227-8F2954F34C36

     

    Old GUID => 7EF7A5EB-E745-43A6-8432-224F4BC2CB1A

    New GUID => 0A82E9A8-0053-4E51-9182-64E6B5D6D0BC

  13. 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.
  14. In your project folder locate and delete the application studio cache file (.aps) in your project.
  15. Launch Visual C++ 6.0 IDE and open your VC++ 6.0/MFC project.
  16. 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.
  17. Click OK to generate the new MFC wrappers.
  18. Optionally, if you sink STK X’s “Application” object’s events, you will need to update its GUID also. See the GUIDs Mapping Table. The IID representation of this follows:
  19. Old => DIID_IAgSTKXApplicationEvents =

    {0x207E59B4,0x1AB9,0x4981,{0x9B,0x54,0xC6,0x5E,0x36,0x8A,0x30,0xC5}}

    New => DIID_IAgSTKXApplicationEvents =

    {0x855A679E,0xF889,0x44CE,{0x95,0xE4,0xB,0x44,0xA3,0x32,0xD1,0x9F}}

  20. Save and compile your project.

Migrating Managed C++ Project to STK 7.0

  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.
  5. Old GUID => 2DB23B84-333C-4CAC-A79A-AAD2B9134A37

    New GUID => CF3DFEA8-8716-4CC4-983E-CA9068AF2BDD

  6. Save the project file.
  7. Start Visual Studio .NET and open your project.
  8. Select References in the Solution Explorer and click Add Reference.
  9. In the Add References dialog box, click the COM tab and scroll down to AGI STK X Util 7. Double-click it and then click OK.
  10. Search and replace all the enumerations used (if any) in your code (.h, .cpp) files from the Enumerations Mapping Table.
  11. Search and replace all the ProgIDs used (if any) in your code (.h, .cpp) files from the ProgID Mapping Table.
  12. Save your code files.
  13. Compile and run your project.

Migrating Matlab Project to STK 7.0

  1. Start Matlab.
  2. Open your existing figure in GUIDE.
  3. Remove the AGI STK X map and globe (version 6) 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:
  8. AGI STK X Map Control 7

    AGI STK X Globe Control 7

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

  9. Open the <m>-file editor.
  10. In your <m>-files replace:

  11.  
    Existing string New string
    actxserver('STKX.Application.1') actxserver('STKX7.Application')
    actxserver('STKX.Application') actxserver('STKX7.Application')
    activex<n> for n = 1,2,3, ..., m Activex<n+m>

     
  12. Save your project.
  13. You are ready to use STK X version 7.

STK Programming Interface 11.0.1