Connect - API or MDL

I am sure this will be an odd question but im trying to figure out if we are using API or MDL or what.

When I take some of the courses on Learn they are talking about things that do not appear in my code.  Just trying to figure this beast out.

Thanks

Steve Watson

Parents Reply Children
  • Hey Robert

    so we are using Connect and migrating from v8i.  currently using Visual Studio 15 to compile into DLL and MA files.  

    the source code extensiong are

    - sln

    - h

    - mke

    - mki

    - r

    - cpp

    Due to security restrictions i am unable to provide files.  I hope this is enough info.

  • the source code extensiong are

    - sln

    - h

    - mke

    - mki

    - r

    - cpp

    You have a mixture of source code, data and tool files.

    Glossary

    im trying to figure out if we are using API or MDL or what
    • SDK means software development kit.  The MicroStation CONNECT SDK includes libraries, tools and documentation for .NET and C++.
    • API means Application Programming Interface.  It's a general term and doesn't define a language or toolset.  In the context of MicroStation CONNECT, the MicroStationAPI is a large library that conforms to C++ standards.
    • MDL is the MicroStation Development Library.  It's a huge library of C-style functions.  With MicroStation CONNECT it's been subsumed by the MicroStationAPI.
    • .sln is a Visual Studio solution.  You can learn about Viz Studio solutions on many sites, including Microsoft of course.
    • .mke is a Bentley make (bmake) file.  There is usually one bmake file per project.
    • .mki is a Bentley make include file.  There are a number of those delivered with the MicroStation SDK.  They are called by your bmake file.
    • .h is a C or C++ header file.  It contains definitions of constants, classes and function prototypes.
    • .cpp is a C++ implementation file.  .
    • .r is an MDL resource definition file, used to store dialog definitions, message lists and command tables.
    • .rc is a Visual Studio resource definition file.

     

     
    Regards, Jon Summers
    LA Solutions

  • Hi Steven,

    so we are using Connect

    I don't want to be meticulous, but to be developer requires to be precise: There is no product named Connect, but MicroStation CONNECT Edition Update <number>. When talking about about native code development, it's crucial to know the version exactly, because different Updates require different version of Visual Studio.

    and migrating from v8i.

    It can be complex process, requiring to rewrite code.

    currently using Visual Studio 15 to compile into DLL and MA files.

    If you use the last version(s) like Update 14 or 15, you use wrong Visual Studio version.

    Plus, Visual Studio is not used to compile MA files, they are compiled by tools delivered with MicroStation SDK.

    I am sure this will be an odd question but im trying to figure out if we are using API or MDL or what.

    The problem with the question is that you "merge" completely different terms:

    • API is general term, so it has to always be specified, for what language the API is designed. MicroStation CE offers COM (used by VBA and potentially by external applications also), Interop (which is NET wrapper around COM, so it can be used by NET applications), NET API (which is new and did not exist in V8i) and C++ (which is evolution of V8i C++ API).
    • MDL has had many different meanings, and in my opinion, today, it means ... only an information you use some API and some language to develop application for MicroStaiton. But in V8 era, MDL was used for API and also C (originally pseudocode, later native code) applications.
    When I take some of the courses on Learn they are talking about things that do not appear in my code.

    For what MicroStation version the tutorials were created? CONNECT Edition API, especially native C++ and new NET, are very different from anything that was available in V8i ... which is also the reason why V8 code has to be migrated, not simply recompiled.

    Regards,

      Jan

    Answer Verified By: Steven Watson 

  • Jan

    so yes we are using MicroStation CONNECT update 14 at this time

    In the process of updating code from v8i to CONNECT we are having to rewrite the code.  However isnt there a tool to help with the conversion?  

    VS 17 not 15 - sorry we are using VS17.  I have been told by my predecessor to use VS17 to build the MA and DLL files.  Where can i find the instructions on the MicroStation SDK to compile the MA files?

    What is the best way to use the Examples provided by the SDK?  are there better help files to go along with what is being done?  would love to see a step by step creation of a project that shows how to build a c++ app from scratch.  I cant find that anywhere.

    Very Frustrated at this point :-( 

  • Hi Steven,

    In the process of updating code from v8i to CONNECT we are having to rewrite the code.  However isnt there a tool to help with the conversion?  

    Yes, you have to. How much (or even whether it's not better to write it from scratch), it really depends on the code itself: What functions it uses and also what is the quality of the code.

    There is a migration tool, delivered with MicroStation SDK, that helps with some mechanical operations (to rename functions where defined conversion exists), but it's only part of the migration process and it requires to understand what is happening and why, because it's the conversion from C API to C++ API, so the conversion is about the change of language (even when C++ is a superset of C).

    In my opinion more useful thing, delivered with MicroStation SDK, are materials from Migration workshop, that was done when first CE versions were released. In the presentation, structural changes in API are explained, and in other PDFs other topics are discussed.

    I have been told by my predecessor to use VS17 to build the MA and DLL files.

    In such case it's the right Visual Studio version.

    Where can i find the instructions on the MicroStation SDK to compile the MA files?

    There is no such "step by step" tutorial delivered with MicroStation, because the process is conceptually the same as for any C/C++ build process (source code > compiler > linker > application, controlled by make file). Information about Bentley specific tools (bmake, how resource are compiled...), available in documentation, are more like reference than tutorial.

    But outside MicroStation SDK, there are learning resource available, see this wiki article.

    What is the best way to use the Examples provided by the SDK?

    All examples in SDK are delivered as "ready to be compiled", so they can be used as "a subject for self-study": Both to learn how make file (.mke) controls the process, and how code should be written. It's the reason why there are so many quite simple projects, because they cover different API functionality (scanning, element creation, how to create tools etc.).

    are there better help files to go along with what is being done?

    For the migration, to go through all materials from the migration workshop is mandatory. Even when they are a bit obsolete from today's point of view, because MicroStation CE itself has changed from the first version, they are still valid, and they cover important issues.

    would love to see a step by step creation of a project that shows how to build a c++ app from scratch.  I cant find that anywhere.

    See sources linked in the wiki page I mentioned above. It's probably all that is available.

    But be aware, that before starting writing C++ code for MicroStation, it's necessary to be able to write C++ standalone code for Windows (or any other OS). Preferably not using Visual Studio, because it hides too much from the process and people who learn programming using VS are often more "push the button" guys than programmer with understanding how C++ world works.

    MicroStation CE is based on standard C++, which is advantage, because it requires to extend knowledge (bmake syntax, learn about MicroStation resources, learn API), but there are no changes in the used language (which was not the case in old times of pseudocode MDL, which was "like ANSI C" only).

    Very Frustrated at this point :-( 

    You did not share info what is your current C/C++ knowledge and experience. If you have no experience with C++, I understand it can be frustrating.

    Also,the frustration can be multiplied by the code itself, because I have saw some "was told V8i code", but in fact it was bad V7 code code somehow migrated, which was nearly impossible to even compile, nor translate. But when code is properly written, following best practices, it can be migrated smoothly (even when it still will require some effort to do it).

    With regards,

      Jan