STK二次开发指南

19 篇文章 2 订阅
17 篇文章 9 订阅

Building an STK Engine Application

STK Engine enables you to build an application that harnesses the analytical power and visual capabilities of STK.

The following will guide you through the process of building an application.

Set Up Your STK Engine Application Environment

Before developing an application, you need to make the following decisions:

  • The type of container application that will be used to deliver your application. A container application can be a Web page, an MS Office application, or any application capable of using Active X controls.
  • The type of programming language that will be used to build your application. You can use Visual C#, STK Java API, MATLAB, Visual Basic .NET, Visual C++, or any other OLE-compatible programming language.
  • The interface that will be used to use to connect to your application. You can choose either STK Object Model or Connect. Connect can be used either via TCP/IP or the COM Interface. The COM Interface can be used if Connect and your application are on the same machine and TCP/IP if they are on different machines. We recommend using STK Object Model to interact with STK.
  • The type of application that you want to build. You can build an analysis-only application or a visualization and analysis application. If the application you are building will have a visualization capability, will it include both 2D and 3D graphics?

Learn How to Use the STK Engine Development Tools

You will use the following software tools to build an application using the STK Engine:

  • STK X . Use STK X to add advanced STK 2D, 3D visualization and analytical capabilities to applications with little effort.
  • STK Object Model. A collection of COM libraries that provide developers with capabilities to control and automate STK objects, manage the lifetime of STK objects, access Data Provider tools, perform access and coverage computations, and respond to events generated by STK.
  • Connect. Use Connect to communicate with STK.
  • STK. Using STK in developing an application is optional. You can use STK to create a base scenario.
  • Any OLE-compatible programming language. The STK Engine Development tutorial (PDF) will show you how to use STK Engine using one of the following programming languages:

When STK X controls are hosted in a MATLAB figure, the mexConnect functions such as stkOpen(), stkExec() etc. may not work properly. This only occurs when STK X controls and aeroToolBox are running in the same MATLAB process. The workaround for this is to use ExecuteCommand() method of the Application object in the STK X for sending Connect commands.

Learn How to Develop an STK Engine Application

See The STK Engine Reference Application which shows how ActiveX components, STK Object Model, and Connect are used to build an STK Engine application.

Develop Your Application

To develop an STK Engine application, we recommend the following process:

  1. Create your base scenario in STK. You can create your base scenario using STK Engine, but it is easier to create it in STK. A base scenario, for example, can contain objects, defined object properties, and custom report styles.
  2. Using STK Engine, Connect, and any OLE-compatible programming language, develop your application from the base scenario:
    • Design the user interface.
    • Design mouse and keyboard interactions.
    • Select specific functionality.
    • Provide documentation for your application.

Developing a STK Engine Application with Visual Studio .NET

Adding a reference to the STK Engine assemblies

  1. In the solution explorer right click on References and click Add reference...
  2. In the bottom right of the dialog click on the browse button.
  3. Browse to the following location: <STK INSTALL DIR>/bin/Primary Interop Assemblies
  4. Select the assemblies for the reference you want to add and click the add button and then the ok button.
  5. In the solution explorer under References, select the added reference and make sure the "Embed Interop Types" property is set to false.

Adding a Globe, Map, or GfxAnalysis control

  1. Open the designer for your form.
  2. Right click inside the toolbox's General section and select "Choose Items..." from the context menu.
  3. On the ".NET Framework Components" tab, click the browse button and browse to the following location: <STK INSTALL DIR>/bin/Primary Interop Assemblies
  4. Select the AGI.STKX.Controls.Interop.dll and click the Open button.
  5. Click the OK button and then add the control you would like from the toolbox to your form.

Using the AnyCPU target

If using the AnyCPU target on a project make sure the "Prefer 32-bit" option is unchecked in the Project's build settings.

Test Your STK Engine Application

To test your application:

  1. Load your application scenario in STK.
  2. Test it to ensure you are getting the desired results.
  3. If you are not getting the desired results, return to your development environment to locate the problem and fix it.
  4. Retest your scenario in STK. If you are still not getting the desired results, repeat steps 2 and 3.

Deploy Your STK Engine Application

To deploy your application:

  1. Create an install for your application. See Deploying an STK Engine application for the different methods you can use to create an install for your application.
  2. Obtain deployment licenses for users of your application.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值