Introduction

The MicroStation Development Library (MDL) and MicroStationAPI provide APIs for developers wanting to create custom applications for MicroStation® from Bentley Systems. We create a MicroStation application as a DLL, written using C++ and built with the Microsoft C++ compiler and linker provided with Visual Studio.

When editing your source code, you can choose whether to use Microsoft Visual Studio, Microsoft Visual Studio Code, or one of your favourite text editors.

When building your app, you can use Visual Studio or the Bentley Systems make (bmake) tools.

Version

We write a Windows resource file, which has a .rc extension. One of the SDK's make include (*.mki) files provides the rule that compiles the .rc to a binary .res file. The binary resource is embedded in the DLL.

A consequence of providing a version resource is …

This AddIn has a Windows resource file ReplaceTextTool.rc. The bmake file shows how to deal with that resource …

ReplaceText Example

We wrote an AddIn that shows how to replace text found in a text element. It adds some commands to replace text, and also a help command. The help command extracts the Windows version resource embedded in the app's DLL, and displays it in the MicroStation Message Center.

Download the Updated ReplaceText Example

The Replace Text Example includes a Windows version resource and the code to handle that resource in a MicroStation AddIn.

Questions

Post questions about C++ and the MicroStationAPI to the MicroStation Programming Forum.

Return to MicroStationAPI articles index.