Microstation Dgn Viewer

In addition to viewing 3D models, you can use Bentley View as a free CAD viewer with tools to search for objects, measure distances and areas accurately, and print drawings to scale with full fidelity, on every desktop, for free. You can easily open DWG and open DXF designs with the same fidelity as the authoring software. Override specific 'MicroStation View Attributes' associated with this DGN 'View': Enabling these checkboxes allow one or more of the MicroStation view-specific attributes to be overridden. The ones we are overriding are outlined with the red rectangle in the 'View Attributes' dialog box above from MicroStation.

One of the critical tasks is the installation and initial configuration of the MicroStation software. Whether downloaded from Select Services or installed from a CD‐ROM, the installation process is the same. However, before you start this process you should always verify the system prerequisites. These are posted on the BE Community wiki.

Note: If you are planning to take full advantage of MicroStation’s digital rights capabilities, you’ll need to install the full 2048‐bit cipher version of Internet Explorer in the United States and the 256‐bit cipher in other countries.

MicroStation V8i Edition supports Microsoft Windows operating systems, including Windows Vista. There is no support for Windows 9x, Windows NT 4.0, or Windows 2000.

To do a complete review of a system’s ability to run MicroStation, run the MicroStation Benchmark. Search for “MicroStation Benchmark” at Bentley’s website.

For dual‐monitor systems, video RAM requirements are 256MB minimum.

Installation Pre‐Requisites

Before installing MicroStation V8i you must first install the pre‐requisites. The pre‐ requisites include:

  • Windows Installer 3.1v2
  • .NET Framework v3.5
  • MSXML 6 with SP1
  • VBA 6.4
  • DirectX 9c
  • DHTML Editing Control for Applications

The pre‐requisites installation is language specific, so be sure you download the correct executable.

The following command will extract the files to the listed location (C:somefullpath) without continuing on to installation:

Setup Prerequisites 08.11.05.05_en.exe /C /T:C:somefullpath

If you open PrerequisitesGUI.hta from the extraction with an ASCII text editor, you can obtain a listing of the files that need to be installed in order to install the Prerequisites for Bentley Desktop Applications in its entirety. The appropriate section begins with the comment “The HTML dialog layout”. Each command line follows the attribute “BSI_CMD=”. You have to issue the command indicated in each of the HTML List Items (LI element tag).

Note: It is highly recommended that you close any programs and disable any antivirus software that is running prior to the installation of this software. Be sure to turn your antivirus software back on again when you are finished.

Installing MicroStation

If all of the installation pre‐requisites have been met, the next step is to install MicroStation. Although a default installation of MicroStation provides the most common set of tools and options, there are times you may need to modify the installation to suit specific needs.

You can install and run MicroStation V8i on the same workstation as a previous versions of MicroStation, such as MicroStation V8 XM Edition. However, you should never install MicroStation V8i in the same folder as an existing MicroStation installation, whether that is MicroStation V8 XM Edition or an earlier release. Install to a separate folder. Also, remember to always back up your data prior to installation.

Note: You must have administrative, or other appropriate, rights to install MicroStation.

Where to install MicroStation

By default, MicroStation installs binary files and executables in the folder C:Program FilesBentley. Prior versions of MicroStation were typically installed in the C:Bentley folder. Although you can install MicroStation in any folder, it is highly recommended you use the default folder provided by the installation software. Installing MicroStation on an alternate drive is acceptable. Shared data is stored in the All Users sub‐folders, making it available to any user.

Documents and SettingsAll UsersApplication DataBentleyLicensing

Documents and SettingsAll UsersApplication DataBentleyMicroStation

Documents and SettingsAll UsersApplication DataBentleyWorkspace

Note: To see all folders in Windows Explorer, select Tools > Folder Options. Then select the View tab and enable the Files and Folders > Hidden Files and Folders > Show Hidden Files and Folders radio button.

Types of installation

Once you have identified the root folder for the installation process, you are presented with several installation types.

  • Typical installs the core software, the core workspace components and several examples of design projects organized by design discipline.
  • Minimum installs the minimum number of components needed to run MicroStation. This includes the core software plus a minimal workspace environment.
  • Complete will install all of the components of MicroStation. This includes all of the files included in the MicroStation install set with the exception of the Wintab graphics tablet interface driver.

Silent or MSI MicroStation installation

Use silent installation to install MicroStation without interacting with the install wizard. To perform a silent installation, run the Windows Installer msiexec at a system command prompt, specifying appropriate installation parameters.

Download and run the executable. When prompted with an installation choice, select the Extract installation package only option. Note the location of the MicroStation.MSI file.

The following command line parameters can be set for a customized silent installation. They allow you to set the installation folder, the location of your workspaces and the information necessary to obtain licenses using SELECT Server.

For example, the following command invokes a silent MicroStation installation producing an install log file named silent.log in C:, placing the program files and workspaces into the specified directories:

  • /l*v C:silent.log will create a log file named silent.log in the specified location
  • /qn indicates the silent install; the installer’s user interface will be suppressed.

INSTALLDIR is the folder where the MicroStation program and associated files will be installed. This value must be quoted if it contains spaces or other characters that are reserved by the command shell.

BSI_USTN_HOMEROOT is the folder where the MicroStation workspaces and associated files will be installed. This value must also be quoted if it contains spaces or other characters that are reserved by the command shell.

/i “MicroStation 08.11.05.17.msi” specifies the MicroStation package to install.

You can also search for the on‐line Help topic “Command Line Arguments and Exception Logs” (include quotes to search for the specific topic).

Suppressing installation of workspace files

Use the following command to suppress the installation of workspace files and set the install to leverage an existing workspace location by setting the workspace path to another location in msdir.cfg.

The first three properties launch the Windows installer, create a log file and specify the MicroStation package to install.

/qn+ is a silent installation with a single modal dialog indicating that theinstallation is complete. ADDLOCAL=ALL installs everything.

REMOVE=”WorkSpaces,Users,SystemBorders,System,Standards,Projects,Interfac es,Font_TraditionalChinese,Font_Korean,Font_Japanese,DatabaseExamples,Addit ionalFontFiles” indicates the components not to install.

INSTALLDIR=c:08110517 BSI_USTN_HOMEROOT=c:08110517‐WS indicates the path to be written as the workspace path in msdir.cfg.

Once you have installed the baseline version of MicroStation with its most common set of components. If, for some reason, you need to install any additional components, you can re‐run the MicroStation installer and select the needed categories.

Microstation Dgn Viewer Mac

Multiple versions on the same system

With MicroStation V8 XM Edition 08.09.02.52 or higher, you also have the option to install multiple versions of the software on the same system.

Warning: This type of installation is suggested for administrators for testing purposes only, as multiple versions cannot be updated. Only the original version can be updated.

If you are installing a second build, different from the original version, on the same system select the Extract installation package only installation option. This offers you a choice to select either the VBS file.

Select the .vbs file for installations of additional product versions for testing purposes. These additional installations cannot be upgraded in the future.

The proper way to perform a multi‐install is to do the following.

  1. Run the appropriate product installer.
  2. Select Extract installation package only.
  3. Navigate to the directory to which you extracted the installer and run EasyMultiInstall.vbs.

Disk space

If an installation fails with an insufficient disk space message, there may not be enough space on the drive assigned to your system’s TEMP and TMP environment variables, regardless of the destination drive you chose.

During the installation, temporary space is needed to uncompress the install set before files are copied to their final destination. If your TEMP and TMP environment variables are pointing to a location on a drive that has less than 500MB of free disk space, and you cannot free up any more disk space, you can permanently assign a new value to TEMP and TMP through Windows’ System Properties. If you do not wish to permanently change these system environment variables, you can do the following.

Viewer
  1. Open a Command shell (Windows Start menu > Run > cmd).
  2. Reassign the TEMP environment variable to another drive or folder that has more space (for example, set TEMP=D:temp).
  3. Set TMP=%temp%
  4. Run MicroStation .exe.
  5. Close the Command shell after the installation process is complete.

Note that the TEMP and TMP environment variables are temporarily reassigned only in the DOS session using these steps. The reassignment does not permanently affect the system environment.

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.

Microstation Dgn Viewer

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

MicroStation Temporary Objects

MicroStation is a 3D CAD tool. Users draw 3D or 2D objects in one of eight views. Drawn objects are termed elements. A graphic element represents something that a user can draw, such as a line, arc, rectangle or cone. Elements are persisted to a DGN file: when a user has drawn an object, she can be confident that after finishing a MicroStation session she can subsequently reopen that DGN file to see the previously-drawn elements.

Developers who write applications for MicroStation one of several APIs …

  • MicroStation VBA
  • .NET DgnPlatformNet and MstnPlatformNet
  • MicroStationAPI
This article is for developers who use the C++ MicroStationAPI. That API lets a user create DGN elements through their application just as they would using MicroStation's built-in tools.

There are times when a developer would like to show a user temporary graphics. For example, during a custom command while constructing a complex object, or an object that relies on adjacent geometry. It is useful to see construction lines that provide clues. Once the command is finished, the temporary graphics vanish: that is, they are never committed to file. Often, the temporary graphics are snappable, meaning that a user can snap a point, such as the beginning of a real line, to the temporary graphics.

Persistent and Non-Persistence Graphic Objects in a MicroStation Session

View Decoration
Sprites provide feedback to the user. Each Sprite — a small image — is designed to provide some meaning in the context of the current command state. Sprites are likely to move, change or disappear frame-by-frame as a command progresses. Sprites vanish once the command is complete and are never written to a DGN model
Transient Elements
Transients are temporary DGN elements. They are created in just the same way as normal DGN elements but are stored in a non-persistent cache and are never saved to a DGN file. A transient element survives as long as the programmer wants it to survive, or until the DGN model is closed, whichever is the sooner
Rubber-Banding
MicroStation draws DGN elements during a command. Rubber-banding provides visual feedback to the user as the command progresses. The elements are recalculated and redrawn frame-by-frame as the command state changes. Usually, once a command is complete, the rubber-banded element is added to a DGN model and becomes permanent

An application designer may choose to use some or all the above techniques when specifying how a MicroStation application should work.

  • Sprites are commonplace: you see them frequently when you use MicroStation. For example, the handles on a Selection Set are Sprites
  • Rubber-Banding is common in element creation and modification tools
  • Transient Elements may be used in complex tools to show some intermediate stage or to show constructions. They may be used for other purposes: for example to show kinematics

Bentley staffer Brien Bastings provided this tip:

A view decorator is good for things that may be changing every frame/cursor motion, an IViewTransient is good for things that don't change often.

Transient Elements and Transient Geometry

In MicroStation terminology, such temporary graphics are called transient. Using the MicroStationAPI in MicroStation CONNECT, you can create both transient elements and transient geometry.

The difference between transient elements and transient geometry is that a programmer can convert a normal element to a transient, whereas transient geometry is anything that you can define geometrically. Using the MicroStationAPI to draw transient geometry also gives you finer control over what is drawn during a number of view update events, and whether the geometry is snappable or not.

Transient Objects from the Developer's Perspective

We wrote this solution in response to a question posed on the Be Community Forums. MicroStation lets programmers create transient geometry in one or more views. Transient geometry and transient elements are never written to file. They may be useful in providing a view of constructions for various reasons — for example, to show a user how a possible contruction may appear before committing it to a model permanentley.

Q How do I draw transient geometry in a MicroStation view?

A A simple question, which turns out to have a complex answer. The MicroStationAPI for MicroStation CONNECT provides the ability to draw pure geometry to a view, as well as the ability to create transient DGN elements.

Terminology

Let's clarify some terminology. We need to distinguish between persistent and transient elements, between MicroStation elements and pure geometry, and between dynamic and other graphic display events.

Persistent Elements
When you create a MicroStation element, that element is added to a model and ultimately persisted to a file. When you reopen the file, the element is available for viewing and manipulation. MicroStation takes care of drawing persistent elements for you. If you have created a persistent element, then there's no need to use IViewTransients.
Temporary Graphics
When you create a MicroStation element, that element is added to a model and ultimately persisted to a file. When you reopen the file, the element is available for viewing and manipulation. MicroStation takes care of drawing persistent elements for you. If you have created a persistent element, then there's no need to use IViewTransients.

With MicroStation CONNECT you can create transient geometry, as opposed to transient elements.

If they are not persistent elements, MicroStation doesn't know about them, and you are responsible for drawing them. The IViewTransients interface provides us with numerous events when we can draw stuff. During a dynamic update, the user is moving the cursor and, yes, your function will be called again and again to create and draw your geometry (geometry, not elements) based on the current cursor position.

Because your geometry is drawn repeatedly, the callback provides an opportunity for you to stop drawing (CheckStop) during one of those events. From the user perspective, this lets your application be responsive rather than slowing everying down because it insists on drawing everything even when there is no need.

Microstation Dgn Viewer

If your geometry is static, and does not need to be recalculated relative to the current cursor position, then drawing it repeatedly during dynamics may be unnecessary.

Transient Elements

Transient elements are not persistent (they are never written to file). However, they are created from a MicroStation element and stored in the transient cache. MicroStation knows about the transient cache and draws its contents for you.

MicroStationAPI: View Transients Project

The purpose of the ViewTransients project is to illustrate the use of the MicroStationAPI and its IViewTransients interface. It requires C++, as does any project that uses the MicroStationAPI. You register at run-time an instance of a class that inherits from IViewTransients. Subsequently, MicroStation calls your object when certain events happen. Your code receives an IViewContext* that you can use to react to different events and draw geometry in one or more views.

By reacting differently to different events, you can simply draw geometry in a view, or make it snappable for pick user operations. For example, you can make a transient line snappable so that a user can snap to a keypoint on the transient while creating genuine MicroStation elements.

Because you draw pure geometry, you don't need to create elements, and you don't have to use the mdlTransient_API.

Building ViewTransients

We assume that you are using the MicroStation development environment to build this project. Consult the MicroStation Software Development Kit (SDK) help for more information, or take a look at our guide to setting up Windows to build MicroStation applications.

As this is a C++ project, you'll need Visual Studio installed. The project builds from a Bentley make (bmake) file, so the purpose of Visual Studio is to provide a compiler and linker rather than an IDE.

As with any application built for native code, the result is in two parts: ViewTransients.ma and ViewTransients.dll. File ViewTransients.ma contains only resource data: in this case, the information MicroStation requires to load the DLL, and a command table. ViewTransients.dll is the implementation file. When a user types mdl load ViewTransients. MicroStation first loads ViewTransients.ma and finds the resource directive (the DllMdlApp in ViewTransients.r) that instructs it to load a DLL, then it loads ViewTransients.dll.

Download the ViewTransients Project

Download the ViewTransients project. This ZIP file contains C++ source code header and implementation files, and a bmake (.mke) file to build the project. You need Visual Studio 2015 to be installed in order to compile this project for MicroStation CONNECT.

Questions

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