The Power Of OLE In MicroStation V8


 Product:MicroStation
 Version:All
 Environment:N\A
 Area:Annotations
 Subarea:N\A

By Bentley Technical Support Group 
18 June 2002

OLE Object Linking and Embedding is a Microsoft Windows technology first introduced to MicroStation users with MicroStation SE. There are several new OLE features in MicroStation V8.

OLE Object Linking and Embedding is a Microsoft Windows technology that allows applications to use the Windows Clipboard to exchange data with other applications. OLE technology was first introduced to MicroStation with the release of MicroStation SE in 1997; MicroStation V8 provides a significant upgrade. This article provides an overview to using OLE in MicroStation V8 and notes what new features have been added.

Copying to the Windows Clipboard

This is the most basic use of this functionality. MicroStation allows the user to copy elements directly from a design file into the Windows Clipboard. These elements can be placed into other applications, including another design file. In Windows, you can select text, bitmapped graphics and metafiles to be copied or cut and copied to the Clipboard.

You can place elements selected in MicroStation for the Windows Clipboard in several formats:

MicroStation Elements: This format is only recognized by MicroStation and is used if the elements are pasted back into the model.

Windows Metafile: This format is used to paste vectors into other applications.

Text: This format is used only if a text element is selected.

To copy elements to the Clipboard:

1. With the Element Selection tool, select the desired elements.
2. From the Edit menu, choose Copy or Cut.

The selected elements are copied to the Clipboard.

Pasting from the Clipboard

In Windows, the formats available in the Clipboard depend on the application from which the data is copied. You can paste text, bitmapped graphics, audio notes and animation sequences into a DGN. You can also paste text into the key-in window.

The OLE Container

When using OLE Container, MicroStation is the container application. The functionality can be found in MicroStation on the main menu at Edit > Paste Special.

OLE objects are MicroStation element representations of data from other applications. This representation can be linked to or embedded into a MicroStation design file. The terms "Linked" and "Embedded" indicate where the other application s native data is stored. A linked OLE object is a reference to data that is not stored in the DGN. An embedded OLE object means that the other application s native data is stored within the DGN.

The basic procedure for linking a document has not changed in MicroStation V8. Here, for example, are the steps required to link an Excel spreadsheet:

1. Open both the Excel spreadsheet and MicroStation file.

2. Highlight the cells you want to link from Excel.

3. Choose Edit > Copy.

4. In MicroStation, choose Edit > Paste Special. You will see the following dialog (Figure 1).


Figure 1: Paste Special dialog.


5. From the Paste Special interface, choose the "Picture of Microsoft Document" option.

Paste Special Options

There are four options available for Paste Special.


Figure2: Highlight the area that is to be copied to the clipboard.


Figure 3: The Excel information as pasted into MicroStation.

In MicroStation V8, users no longer have to worry about having Windows True Type fonts installed in their resource file. One of the many enhancements of MicroStation V8 is that it supports True Type fonts. This is very beneficial when linking and embedding data from documents that use Windows True Type fonts. Users can simply paste this data in and the fonts will appear correctly.


Figure 4: Select the "By Size" method in the Paste OLE dialog.


Figure 5: A scale value can now be applied to the object.

A really nice feature when pasting in elements or text in from applications such Excel or Word is that these elements can be brought in at a true scale. This is based upon the working units that are set in the DGN or DWG file you are using. When the object is copied to the clipboard, the natural width and height show up in the Paste OLE dialog and the very bottom of the screen. Figures 4 and 5 show the steps involved in bringing in text.

Updating Linked Objects

A vital part of linking and embedding data from other applications is to ensure that any changes in the data are always reflected in MicroStation. MicroStation V8 allows both manual and automatic updates of the data.

By default, linked objects are updated automatically if the container DGN file is open. For example, if the document is a spreadsheet, clicking another cell automatically updates the object in the DGN file. Edits to embedded objects are always updated automatically.

MicroStation V8 takes the guesswork of updating links away by allowing you to update all links in the design file. To do so, go the Edit menu and choose Update Links.

The Update Links dialog appears, showing a progress bar. The dialog closes once all links have been updated.


Figure 6: Activate Update Links from the Edit menu.

Note on using embedded objects
Although double-clicking an embedded object opens the document in the source application, that document is actually part of the DGN file. Note that the name and path of the DGN file appears in the title bar of the document. Closing the DGN file closes both the document and the source application in which you were editing it.

See also

Other language sources

 Original Author:Bentley Technical Support Group