I am working with Microstation Connect Update 16 using C# application.
The following sets the premise of my question -
1. Microstation Connect Update 16 is not started yet (I want to start it from my code)
2. Added reference "Bentley.Interop.MicrostationDGN.Dll"
3. Created the Object of Application Class.
4. Calls the "OpenDesignFile()" method on the Application object.
Result
Microstation Connect Update 16 instance starts but shows blank window and no DGN file is opened.
Can you help me, why DGN file is not opening up ?
Thanks
H. S. Matharu
Harpreet Singh Matharu said: Added reference "Bentley.Interop.MicroStationDGN.Dll"
Harpreet Singh Matharu said:The problem is when I draw in the DGN. It always draws in the first opened instance of MicroStation
You're using COM to start an executable (MicroStation). One of the drawbacks of COM (20th century technology) is that it can't differentiate between running executables. You must find another way to identify each instance of MicroStation. As a Windows programmer you can use system features of C++ (Win32) or .NET. As I advised already, consult Microsoft web sites to find how to get a reference to a specific instance of a running process.
Don't use COM, because it leads to the problem you describe. Instead, design an in-process app or macro that you can invoke with a MicroStation key-in (e.g. macro run HarpreetVba or mdl load HarpreetSingh). Then you can invoke the appropriate key-in from each MicroStation process.
macro run HarpreetVba
mdl load HarpreetSingh
Regards, Jon Summers LA Solutions
Thanks Jon,
This is what I wanted to understand. I understood it is a limitation and I need to find out some other solution.
Harpreet