Questions similar to these appear in the Be Communities MicroStation Programming Forum.

This page lists some solutions to common MicroStation VBA (MVBA) problems. Tips are published as examples and are not necessarily working code.

Breakline Tool

The Breakline tool was developed in response to a request by a MicroStation CONNECT user. He had a BASIC macro from the last century. Because BASIC is not supported by MicroStation CONNECT, he wanted a VBA equivalent. The Breakline tool creates a zig-zag line …

Breakline Tool

The purpose of the tool is to let a user place a planar breakline between two points …

Breakline Screenshot

The Breakline tool should work in a 2D or 3D DGN model. The line itself is planar (i.e. flat) but you can place it at any angle or orientation.

Breakline Key-Ins

Load the VBA project using key-in
vba run [Breakline]modMain.main

The Breakline VBA UserForm pops …

Breakline Tool

You don't need to know anything about VBA to use our tool. If you're not interested in the description of the VBA code that follows, then skip to the download section.

User-Requested Enhancements

Templates
The tool uses a template to construct the breakline. The template is a line element of unit size. The tool scales the template as you place data points. Two templates are offered with the tool: one is a zig-zag, the other is a zag-zig.

Breakline Tool: VBA Code Overview

The macro has four VBA modules …

Module modMain Contains the Main entry point and some standard code and data
Module modBreakline Contains a number of procedures that concern breakline template creation and manipulation
UserForm frmBreakline The user interface
Class clsBreaklineTool Implements IPrimitiveCommandEvents as the breakline placement tool

VBA UserForm frmBreakline is the primary user interface, which is displayed when the macro is run.


Download

Download the Breakline Tool

You can download the Breakline MVBA project. The project includes the MVBA project Breakline.mvba.

Breakline Tool