I am using the COM API through Interop assembly code below to scan the document for some reporting.
public Application ustnApp = new ApplicationClass();
ustnApp.OpenDesignFile(fileName);
(Blank UI)
Interestingly, when I run it in CONNECT i always get his blank UI popping up, while the blank UI is NOT showing up if I use V8i. How can that be possible?
If I don't want any UI to show up (only want the code to quietly read the Microstation file and generate the report), what should I do?
Thanks,
Unknown said:If I don't want any UI to show up (only want the code to quietly read the Microstation file and generate the report), what should I do?
Try Application.Visible = False
Application.Visible = False
Regards, Jon Summers LA Solutions
Unknown said:Very interesting, I don’t see the blank UI when running it on V8i.
The MicroStation CONNECT SDK provides two .NET APIs: the DgnPlatformNet and the MstnPlatformNet. Rather than use the COM InterOp from C#, you can write normal C# code. There are several C# examples delivered with the SDK.
Unknown said:Rather than use the COM InterOp from C#
It depends on what type of application is required. Tao mentioned the code scans a files because of reporting, so I assume accessing MicroStation running at background from another application is expected. And in such case Interop is the way to go.
But it's my assumption, not confirmed by Tao.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan and Jon,
Yes, the c# program has its own UI for report viewing. I only need to access Microstation to get all the data, and therefore I really do not want the blank UI to show. COM InterOp may be all I need if I can get rid of the blank UI. (still not able to do it by now with COM InterOP in CONNECT).
I will look at DgnPlatformNet and the MstnPlatformNet and the c# example code also.
Hi,
I have tested this issue with MicroStation CONNECT Edition Update 13 and it is still reproducible.The same code example configured to use with V8i SS10 does not open this app window.To address this regression issue I have filed Defect # 1050484.
Best regards,Artur