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 TextNodeElement
s.
It works with both MicroStation CONNECT and MicroStation V8i.
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 …
The dialog provides these controls …
TextNodeElement
TextNodeElement
from the contents of the ListBox.
Prompts the user to place the new element
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 …
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.
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
.
To start splitting text, type the following into MicroStation's keyin dialog …
vba run [CreateTextNode]modMain.Main
Post questions about MicroStation programming to the MicroStation Programming Forum.