Learning MicroStation VBA

Chapter 28: Tags

Tags store and display information associated with elements in a design file and to display the same type of information from file to file. The data stored in each tag is different. For example, "Drawn By" is a useful piece of information for every file but the actual value may vary from file to file.

Use the macros in this chapter with the "Building" project that is installed with MicroStation.

Getting Information from Tags based on a Selection

Let's begin our look into the wonderful world of tags by having the user (in this case it is probably us) select a tag and get some basic information from it.

Sub <b class="bold">GetSelectedTagA</b>()    Dim myTag As TagElement    Dim myElemEnum As ElementEnumerator    Set myElemEnum = _           Application.ActiveModelReference.GetSelectedElements    While myElemEnum.MoveNext        Select Case myElemEnum.Current.Type            Case MsdElementType.msdElementTypeTag                Set myTag = myElemEnum.Current                If myTag Is Nothing = False Then                    MsgBox myTag.Value                End...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: RFID Tags
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.