We use cookies to analyze traffic and provide you with better content. By continuing to use our site, you agree to the use of cookie technology. Read more. I agree
Slide background

Developer -

Getting started
  • Download and install TerraExplorer Plus.
  • Create a new Windows Forms Application project in Visual Studio, using either C# or VB.Net:
    • a. In Visual Studio, select File> New> Project.
    • b. If you want to create a C# project: Select Visual C#> Windows> Windows Forms Application. Name the project TerraExplorerShowcase, and click OK.
    • c. If you want to create a Visual Basic project: Select Visual Basic> Windows> Windows Forms Application. Name the project TerraExplorerShowcase, and click OK.
  • Add TerraExplorer ActiveX objects to the Toolbox.
    • a. In Design view, right click the Toolbox, and select Choose Items.
    • b. Click the COM Components tab and select the TE3DWindow Class, TEInformationWindow Class and TENavigationMap Class check-boxes.
    • c. Click OK. Three icons are added to your toolbox: the 3D Window, the Information Window and the Navigation Map controls.
  • Add a 3D Window to the form.
    • Click the 3D window control icon in the toolbox and drag it to the required location on your form.
  • Reference TerraExplorerX COM dll.
    • a. From the Project menu, select Add References.
    • b. Click the COM Components tab and locate TerraExplorerX 1.0 Type Library from the available references.
  • Add the using directive for TerraExplorerX namespace in the Form1 code.
    Imports TerraExplorerX
  • Define a variable to hold a SGWorld object instance.
    • Note: You will use this variable later to access extensive TerraExplorer API.
    Private sgworld As SGWorld65
  • Initialize a SGWorld object.
    • Note: This object will automatically find the ActiveX control that you have placed on the form and interact with it.
    • Note: You should initialize this object only after the ActiveX object was already created, i.e. after the call to InitializeComponent() in the constructor.
    sgworld = New SGWorld65
  • Now you can use SGWorld object to control the TerraExplorer ActiveX. The following code loads a .fly project and flies to a specific location.
    Imports TerraExplorerX
    Partial Public Class Form1
        Private sgworld As SGWorld65
        Public Sub New()
            sgworld = New SGWorld65()
        End Sub
        Private Sub Form1_Load(sender As Object, e As EventArgs)
            ' Register to OnLoadFinished globe event
            AddHandler sgworld.OnLoadFinished, AddressOf OnProjectLoadFinished
            ' Open Project in asynchronous mode
            Dim flyFile As String = "https://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly"
            sgworld.Project.Open(flyFile, TrueNothingNothing)
            MessageBox.Show("Opening project " & flyFile & " in async mode")
        End Sub
        Private Sub OnProjectLoadFinished()
            MessageBox.Show("Received project loaded event. Click OK to fly to  Washington DC.")
            Dim Washington As IPosition65 = sgworld.Creator.CreatePosition(-77.036667, 38.895111, 1500, AltitudeTypeCode.ATC_TERRAIN_RELATIVE, 0, 0, 0, 0)
        End Sub
    End Class
  • Download additional code samples and examples of TerraExplorer’s capabilities for C# or VB.Net.
    • Note: Those samples require Visual Studio 2008.

Reference Guide

See complete list of methods
and properties


Developer Evaluations
Request Form