www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe Enterprise Products > TerraExplorer for Developers
  New Posts New Posts RSS Feed - TerraExplorer 64-bit not running
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TerraExplorer 64-bit not running

 Post Reply Post Reply
Author
Message
khaled View Drop Down
Visitor
Visitor


Joined: May 14 2019
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote khaled Quote  Post ReplyReply Direct Link To This Post Topic: TerraExplorer 64-bit not running
    Posted: May 14 2019 at 2:07pm
Dears,

I am new to the development of Skyline and I followed the c# development tutorial in the website.
I have TerraExplorerPro 7.0.2
Firstly I can't find the "TENavigationMap Class" in the COM components although I tried to reinstall the program again and also on another device with no success.

I used in my code SGWorld701 instead of the SGWorld66 which is in the example, I replaced any 66 with 701 but the following line is not working:

sgworld.OnLoadFinished += new _ISGWorld66Events_OnLoadFinishedEventHandler(OnProjectLoadFinished);

Also if I comment that line and try to run, the 3D window in the windows form gives me the following error:
TerraExplorer 64-bit cannot run natively in a 32-bit application

although I used the TEX32to64.dll with no success.

Could anyone help on that?
Best Regards
Khaled
Back to Top
Eylon View Drop Down
Skyline Admin Group
Skyline Admin Group
Avatar

Joined: May 05 2003
Location: Israel
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eylon Quote  Post ReplyReply Direct Link To This Post Posted: May 21 2019 at 10:01pm
Dear Khaled,

Please see information below, taken from the soon to be released updated TE 7.1 Programmers guide.
you can get the full CHM from here: Http://dev.skyline.co.il/up/eylon/TE71PG.zip

The ITENavigationMap5 interface is currently being phased out, but legacy support is still provided. This interface provides control over the Navigation Map window elements. The navigation map can only be created as an ActiveX control.

Using the Navigation Map in C#
Legacy support is provided for the ITENavigationMap5 interface. It is no longer available from the Visual Studio designer, but it can still be created from code, using the AxHost class as appears in the code below.

To use the navigation map, a reference to AxTerraExplorerX must be added to your project. This can be done, by adding one of the existing designer objects, like TE3DWindowEx (and then possibly deleting it), or by using Aximp as described in the Remarks section of the following article: https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.axhost?redirectedfrom=MSDN&view=netframework-4.7.2#Anchor_7



    public partial class Form1 : Form

    {

        private AxHost ThreeDWindow = null;

        private AxHost NavMapWindow = null;



        public Form1()

        {

            InitializeComponent();

        }



        private void Form1_Load(object sender, EventArgse)

        {

            ThreeDWindow = new AxTerraExplorerX.AxTE3DWindow() { Dock = DockStyle.Fill };

            pnl3DWindow.Controls.Add(ThreeDWindow);

            NavMapWindow = new AxTerraExplorerX.AxTENavigationMap() { Dock = DockStyle.Fill };

            pnlNavMap.Controls.Add(NavMapWindow);

        }

    }

For OnLoadFinished, I am not sure what is wrong, but maybe after you rebuild with the below information, it will work.

TerraExplorer exposes both in-process and out-of-process ActiveX controls:

§    ITE3DWindow and ITEInformationWindow – When instantiated, these components are created as in-process DLL COM objects, i.e., they are loaded into the same executable as the host application. In-process objects enjoy the advantage of faster in-process COM communication with the host application. They also share resources with the host application, e.g. memory and CPU. Their main constraint is that the host application must be 64-bit, to allow the TE 64-bit DLL’s to be loaded into the same application.

§    ITE3DWindowEx and ITEInformationWindowEx – When instantiated, these components are created as standalone out-of-process COM executables (one for each ITE3DWindowEx). This offers two main advantages: it enables the creation of multiple 3D windows in the same application (including one regular ITE3DWindow, and multiple 3DWindowEx’s), and supports hosting by both 64-bit and 32-bit (i.e., Internet Explorer) applications. The downside of out-of-process objects is that COM communication may be slower when handling intensive calls and events.

Note:    Visual Studio, which is a 32-bit application, does not support using the form designer when embedding the 64-bit ITE3DWindow in the form. To use the form desiger use an x86 project configuration (change configuration, save, reopen VS, reopen project). Then you can switch to x64 in order to build the x64 application. Alternatively you can design the form by code only.

Working in a C# Environment

C# allows you to easily add ActiveX controls to your application. TerraExplorer provides ActiveX controls for the 3D Window, Project Tree (Information Window), external 3D Window, and external Project Tree. Add them to your project and build your own custom GUI with embedded controls.

The instructions provided here refer to Microsoft Visual Studio 2017.

1.       Add the ActiveX components to the Toolbox – While in design view, right click on the Toolbox, and select Choose Items. In the dialog box select COM Components tab and select the check-boxes next to TE3DWindow Class, TEInformationWindow Class, TE3DWindowEx Class, and TEInformationWindowEx Class and then click OK. Four icons are added to your toolbox, the 3D Window , Project Tree (Information Window) , 3DWindowEx , and external Project Tree controls.

Note:    Visual Studio, which is a 32-bit application, does not support using the form designer when embedding the 64-bit ITE3DWindow in the form. To use the form desiger use an x86 project configuration (change configuration, save, reopen VS, reopen project). Then you can switch to x64 in order to build the x64 application. Alternatively you can design the form by code only.

2.       Add any of the following elements to your form:

·          TE3DWindow Class – Click on the 3D Window control icon and draw the location of the 3D Window on your form.

·          TEInformationWindow Class – Click on the Project Tree control icon and draw the location of the Project Tree on your form.

·          TE3DWindowEx Class – Click on the 3DWindowEx control icon and draw the location for an external 3D window on your form. Repeat for each external 3D Window that you want to add.

·          TEInformationWindowEx Class – Click on the external Project Tree control icon and draw the location for an external Project Tree on your form. Repeat for each external Project Tree that you want to add.

3.       If you are using an external 3D window (ITE3DWindowEx), do the following:

a.       Create an SGWorld instance from the external 3D Window – Use ITE3DWindowEx.CreateInstance to create an instance of the 3D Window.

ISGWorld71 SGWorld = (ISGWorld71)axTE3DWindowEx1.CreateInstance("TerraExplorerX.SGWorld71");

b.       If you are using TEInformationWindowEx, attach it to the specific external 3D window – Use ITEInformationWindowEx.AttachTo3dWindow to attach the Project Tree to the specific 3D Window.

axTEInformationWindowEx1.AttachTo3dWindow((TE3DWindowEx)axTE3DWindowEx1.GetOcx());


Eylon
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.039 seconds.