When starting the program via:
gobjGeoApp = CType(CreateObject("Geomedia.Application"), geomedia.Application)
I get the following error message: The ActiveX component cannot be created.
On the other hand, I open Geomedia and use the GetObject method instead of CreateObject:
gobjGeoApp = CType(GetObject(, "GeoMedia.Application"), geomedia.Application)
it works. I'm using Geomedia version 16.6.0 build 1200 and Visual Studio 2019.
I have included the following references:
I cannot currently explain why it is. Can you help me with the problem?
Wednesday - last edited Wednesday
Did you ever try without type casting?
Dim gobjGeoApp as Object
gobjGeoApp = CreateObject("Geomedia.Application")
Btw: You have to use Strict Off for this.
I tried with GM 18.104.22.1680 and VS2010. Works without problems.
Maybe your GM installation is corrupt or there is a problem with the combination GM & VS2019.
Have no others ideas, sorry.
I don't know either. If you have a reproducible test case you probably need to file a support ticket. GM 16.6 is built with VS2017 and is compatible with VS2019 so hopefully that's not the issue! - Hal
I tested the test.vbs program to rule out VB2019 as the cause.
SET gobjGeoApp = CreateObject("Geomedia.Application")
SET objDoc = gobjGeoApp.Open("c:\Geoworkspaces\USSampleData.gws")
gobjGeoApp.Visible = True
The same error message appears.
My installation may be corrupt. I'll check that and maybe redo.