Introduction

MicroStation users sometimes want something different from the set of tools provided in the product.

Q How can I create a text node element in MicroStation with VBA?

Questions similar to this, posed by MicroStation users and VBA developers, appear on the Bentley Discussion Groups, typically the MicroStation Forum or Programming Forum.

A This VBA project implements a text node creator tool. It works with VBA TextNodeElements. It works with both MicroStation CONNECT and MicroStation V8i.

VBA Create Text Node

The VBA project pops a UserForm as a modeless dialog. Click the Add button to add one or more words or phrases that will become text lines in the text node element …

CreateTextNode

The dialog provides these controls …

The text editing is somewhat elementary. However, this article is about creating a DGN text node element, and not about how to use VBA controls.

Click the Create button to place a text node that contains the text shown in the dialog …

Text Node

The text node element and text elements take their symbology and sizes from the active text style.

The text node element is adjusted to the rotation of the active view.

Download the CreateTextNode VBA Project

Download CreateTextNode.ZIP

The above code is available in this MicroStation VBA project. Unpack the ZIP archive and copy CreateTextNode.mvba to a location where MicroStation can find it. A good place to copy it would be C:\ProgramData\Bentley\Organization\Standards\Macros.

How to start CreateTextNode

To start splitting text, type the following into MicroStation's keyin dialog …

vba run [CreateTextNode]modMain.Main

Questions

Post questions about MicroStation programming to the MicroStation Programming Forum.