Two Centuries of MicroStation Development

Writing this blog in September 2015, I can look back over two centuries (20th and 21st) of MicroStation programming.

MicroStation 4 and MDL: a Technical Revelation

Around 1990 I became aware of MicroStation and its precursor, Intergraph Corporation's Interactive Graphic Design System (IGDS). IGDS had a user-unfriendly development language User Commands (UCMs), which was very limited in scope. MicroStation replicated that and added the MicroStation customer support library (Micro-CSL). Micro-CSL was richer, from the programmer point of view, but added nothing to the user interface.

Then Bentley Systems announced MicroStation v4 with an input state machine and a modern windows, icons, mice, and pull-down menus (WIMP) user interface (UI). The UI, named Motif, was layered on the then state-of-the-art X-Windows. This ran, astonishingly, on a 16-bit PC using the MS-DOS operating system, well before Microsoft invented Windows. It used a memory extender developed by Phar Lap to step beyond the 640Kbyte memory limit imposed by MS-DOS and its 16-bit processor.

At the same time, Bentley Systems introduced the MicroStation Development Language (MDL). MDL was innovative in so many ways, ways that continue to inform our MicroStation programming today...

  1. Input state machine functions that let your commands behave in the same way as MicroStation built-in commands
  2. Library of high-level functions for 2D and 3D operations
  3. Library of functions to manipulate 2D and 3D elements
  4. A user interface that programmatically separates form & function
  5. A dialog manager that moves application data between your variables and your dialog items
  6. Compiler and Resource binary tools to convert your source code into binary objects
  7. Code and Resource linkers to merge your binary objects into the executable MDL application

At the time, I was wary of a 32-bit CAD tool grafted onto a 16-bit operating system. But in 1993, Bentley Systems released MicroStation V5 concurrently with Microsoft's release of Windows NT: a multi-tasking, 32-bit, virtual memory operating system. My scepticism evaporated.

MicroStation 5 not only ran on Windows NT: we were spoiled for choice of other platforms. Almost every flavour of UNIX was supported, along with the Apple Macintosh, Digital's VAX/VMS and Microsoft's MS-DOS. That was a technical tour-de-force by Bentley Systems that had some people gasping in disbelief. For example, a DGN file on a big-endian Sun workstation was binary compatible (i.e. interchangeable) with a DGN file on a little-endian Intergraph workstation. If you installed MicroStation on an Apple Macintosh computer, it ran with a Macintosh interface; if you installed MicroStation on an HP workstation, it ran with a Motif interface.

Shortly after that display of technical audacity by Bentley Systems, I set up LA Solutions Ltd. My goal was to develop applications for MicroStation users. Our language of choice was MDL. You could justifiably argue that there wasn't much of a choice then, as UCMs were unsuitable for commercial development, MicroStation BASIC had not been invented, and the nature of MicroCSL didn't lend itself to the writing of appealing applications.

At LA Solutions, we wrote plenty of applications using MDL, both off-the-shelf and custom. While the MDL user interface lacks a decent design tool, it provides none the less an elegant way for the programmer to let a user interact with his application variables. However, MDL is an implementation of ANSI C, and with the increasing popularity of object-oriented languages such as C++ and Java, I became programmatically envious of those able to take advantage of those modern languages.

MicroStation Java

Then came MicroStation/J, where 'J' means Java! Bentley Systems provides a Java virtual machine that ran in parallel with the MDL interpreter. MicroStation Java was a port of Sun Microsystems' Java: it was an object-oriented programming tool integrated with MicroStation. Bliss! We were able to write code productively in a popular new object-oriented language and were able to create a user interface based on Java's Swing libraries. Unfortunately, Swing was not integrated with MicroStation: it is a good user interface, but stood apart from the MDL Dialog Manager used by the MDL user interface. That made it hard to design a Java app. that meshed well with MicroStation and other MDL apps.

MicroStation V8

At the turn of the 21st century Bentley Systems revealed their intentions for MicroStation V8. MicroStation V8 is available only for Microsoft Windows.

Java was no more! All that effort we had put into learning a new language was lost. But, hang on, what about C++? With V8 it was now simple to write a DLL using C++ tools from Microsoft, and that DLL was an executable running in MicroStation's address space. What's more, we could use the MicroStation Development Library (note the new expansion of the MDL acronym) and the MDL dialog system. If you want to use Windows dialogs as well, or instead of, MDL dialogs, that was also possible.

MicroStation V8 introduced the foundation of what we have today:

  1. A modern development language (C++)
  2. C++ can call the huge MDL catalogue of functions
  3. A rich user interface provide by either of both Windows UI or MDL UI components
  4. Use Microsoft Visual Studio to write and build application DLLs
  5. Ability to include third-party components (e.g. a spreadsheet) in Microsoft Foundation Class (MFC) dialogs
  6. Build native-code apps. that are the fastest possible implementation of hard computing tasks

MicroStationAPI

With MicroStation XM, in 2006, Bentley Systems first published the MicroStationAPI. The MicroStationAPI is a C++ programming interface, in contrast to the C-language MDL. These days, many new features of MicroStation are available to programmers only through the MicroStationAPI and not MDL. MDL remains compatible with C++, because C++ is a superset of the C language. A typical app. will use both MDL and the MicroStation when creating an application for MicroStation V8i.

We can use C++, the Standard Library and public extensions provided by, for example Boost and Eigen. Programmer productivity is enhanced because we can write better abstractions of the task when designing an application We spend less time footling with trivia as C demands, such as memory management. Our C++ code is easier to write, easier to maintain and compiles to a high-performance native DLL.

MicroStation CONNECT

Bentley Systems are introducing us to their 64-bit application MicroStation CONNECT. If you take a look at the UI you can see many changes: MicroStation CONNECT offers a lot more than just a huge memory space where large models can live.

From my point of view, as a programmer, the API — renamed the MicroStationSDK — has changed equally dramatically. Vestiges of MDL remain, but the emphasis is now on C++. Many classes and methods have been renamed, moved to a new C++ namespace or both of those. I have a lot to learn.