I have the source code for several MDL programs that have been given to me. Is it possible to compile these programs into .ma files without the SDK? If it is possible then does anyone have instructions on how to accomplish this?
Hi Brenden,
no, it's not possible. You do not provide any information for what product and what version your code is, but it's not important for the general discussion.
The reason is that you need many things from SDK:
Plus, when it's native code, you need specific Visual Studio Prfessional version, depending on for what product and version you want to compile the application. For V8i it was Visual Studio 2005 Professional, for the latest CE versions it's Visual Studio 2017 Professional.
BTW It's usually better and more efficient to ask in product programming forums (like MicroStation Programming forum, Civil Programming forum etc.).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thank you, Jan. It is version v8i series 4.
Brenden OReilly said:It is version v8i series 4.
I guess you mean MicroStation V8i (SELECTseries 4) ... there were several versions released, but from development perspective they are the same.
To create a native code application, in this case you need VisualStudio 2005 Professional and SDK of the same version as MicroStation (often they have nearly exactly same build number).
Regards,
Jan,
Thank you.
Jan, thank you for your response.
One last question:
For MicroStation v8i ss4, is it possible to write and compile programs written in C# for MicroStation without the SDK? Or is the MicroStation SDK required for that too?
Brenden OReilly said:is it possible to write and compile programs written in C# for MicroStation without the SDK?
Yes, it is. It's the same for V8i and CE, that NET API is delivered with MicroStation installation, because in fact, the assemblies are integral parts of MicroStation itself. But there are some situations, when even for NET development, SDK is required or helpful at least.
You should be aware you cannot compare MDL / C++ API and NET API in V8i, because NET is not "real NET", but only Interop library around COM/VBA object model (plus WinForms are available, which is not the case of VBA). The benefit of this situation is that VBA documentation and examples can be used, on the other hand API is quite limited and in certain situations to call MDL through P/Invoke is necessary (which is where SDK doc helps).
Honestly, why this zigzagging? Unfortunately SDK is not available freely, but BDN membership for in-house development is done through free extension of SELECT / OpenAccess agreement. Plus, if there is MDL source code available, to compile it using SDK should be quite simple, they can be migrated to native API alternatively, but when C# will be used, it's about to write it completely from scratch.
Thanks again, Jan. To answer your question about why all the zigzagging? I don't know the answer to that, but I am being asked to compile or rewrite MDL programs without the SDK.
Brenden OReilly said:but I am being asked to compile or rewrite MDL programs without the SDK.
Without knowing context it sounds like how to do things in inefficient way and probably invest a lot of time and to spend a lot of money.
Potentially to rewrite e.g. old simple V7 MDL into V8i C# can be more efficient than to try it to migrate and compile code, but typically it's not that case. Especially because limited Interop (VBA) API, when often P/Invoke (or even C++/CLI) is required to call C/C++ functions missing in Interop API. But it depends what applications do, for some workflows Interop API is perfectly fine.
I'm sorry you are being asked to do the ridiculous. Why would they expect you to do a project of that magnitude without the proper tools?
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
Brenden OReilly said:I am being asked to compile or rewrite MDL programs without the SDK
MaryB said:I'm sorry you are being asked to do the ridiculous
I agree: If I took my car to a repair shop with no tools I would not expect a satisfactory result.
Regards, Jon Summers LA Solutions