I have a problem creating a new microstation object from my current session ( that i should use to perform some file operations without closing current dgn )
the problem is that i need a bentley map session ( that is, to load a specific configuration file , "msgeo" ( should be enough, i think ) , while the object i create starts with last user configuration file that was used ( so that , sometimes, it loads without some functionalities i need and crashes )
that's how i'm creating the object :
Bentley::Interop::MicroStationDGN::ApplicationObjectConnector^ myMStationC =
gcnew Bentley::Interop::MicroStationDGN::ApplicationObjectConnectorClass();
Bentley::Interop::MicroStationDGN::Application ^app = myMStationC->Application;
what should i add to load "msgeo" user configuration file ?
Hi Alessandro,
as far as I remember, it was discussed arelady in the past and I think it's not possible to start an application using Interop Connector including arguments.
A workaround is to start Bentley Map with arguments using standard NET API (through shell or using Process.Start method, maybe there are some others) and from PID to get Application instance (remember I saw some examples on Internet). Also MicroStation Detector from Jon Summers may help, but I have no personal experience.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point