Bentely Microstation Connect Edition Application object Connector

Greetings,

Could anyone help me in this please?

I am trying to use C# code to open OpenDesignFile using “Bentely Microstation Connect Edition”.

I am using the below code:

*******************************************
 MicroStationDGN.Application microStationApplication;

 MicroStationDGN.ApplicationObjectConnector applicationObjectConnector = new MicroStationDGN.ApplicationObjectConnector();

 microStationApplication = applicationObjectConnector.Application;
                microStationApplication.OpenDesignFile(@"Path", false);
                microStationApplication.Visible = true;
*******************************************

Every time I build this code I receive the below exception:

---------------------------

---------------------------
System.Runtime.InteropServices.COMException (0x80010001): Creating an instance of the COM component with CLSID {E95E943A-545B-46A5-B2A8-0B590262EEC3} from the IClassFactory failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).

   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)

   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)

   at System.Activator.CreateInstance(Type type, Boolean nonPublic)

   at System.Activator.CreateInstance(Type type)

   at TestNew10Microstation.Form1.button1_Click(Object sender, EventArgs e) in
---------------------------
OK  
---------------------------

Please help;;

Parents Reply Children