I'll try to explain the issue(s) in a detailed way.
The MicroStationDGN.Application VBA object works fine as long as MicroStation only is installed.
The MicroStationDGN.Application VBA object seems to start the latest installed application when multiple applications are installed,
for instance if Bentley View or Bentley Navigator has been installed after MicroStation.
Therefore - the big question is, whether it is possible to force MicroStation only to start when the MicroStationDGN.Application is activated in the vb,net code?
Regards,
Roald Tvedt
Hi Roald,
I am not very experienced in using MicroStation from outside (just personal dislike for Automation and COM technologies ;-), but what I know is it's general problem of how invocation of application object is implemented in Windows. So it's not about to force MicroStation, but about how to force Windows ... and from various discussions not related to MicroStation it seems to me it's not possible to control what application is started easily.
I guess a workaround (but I read about only, not tested it hands-on) can be to start specific application upfront in automation mode and to connect through Application object afterwards. Because running process is used for the connection and no new is started by default, it should work.
There was a discussion where pretty the same approach was used, so you can try to copy it into VB.NET environment.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Unknown said:The MicroStationDGN.Application VBA object seems to start the latest installed application when multiple applications are installed
That's the way that Microsoft COM works. When you install a COM-enabled application (MicroStation, View, Navigator etc) the information about COM is stored in the Windows Registry. When you invoke the COM server associated with a particular Registry key (e.g. MicroStationDGN), Windows knows to start that application. When multiple apps. provide the same capability (i.e. MicroStationDGN) then the most recent installation wins.
If you're prepared to footle with the Registry, then you can set the entry for a key (such as MicroStationDGN) to another app. Footle with the Registry with caution!
Regards, Jon Summers LA Solutions