Tips
New Reference Attachment Options
In this tutorial we will demonstrate how to attach a reference file using different methods. ; First we will begin with Coincident and Coincident – World then move the attachment after placement using a new option that allows the reference to be manipulated as an element.
MicroStation Element Enumerator
Many MicroStation vba’s use the ElementScanCriteria to build a list of elements in a model that match a set of selection criteria. The ElementEnumerator object is then used to iterate through all of the elements in the list. The sub below is a common example of this.
Sub EE_Example()
Dim ee As ElementEnumerator
[...]
MicroStation Debug
Sometimes you need to know what configuration variables are being set, and when they are being set. It could be that you are creating a new workspace, editing a workspace, or maybe something doesn’t seem quite right in your current MicroStation setup. The easiest way to get this information is by adding the –debug switch [...]
String to MicroStation Master Unit Conversion
MicroStation allows users to input units as Sub Units by preceding the value with either a colon, “:6”, or two dots, “..6”. Users may also enter unit values in MU:SU:PU format. In MicroStation dialogs these input formats are automatically converted to their Master Unit equivalents. Unfortunately when writing your own VBA macros in MicroStation there [...]
3D Photo Match
In this tutorial we will demonstrate one workflow to create a photo simulation using MicroStation.
Below are some items to consider before you take your first photo. Ranked in order from “most important” to “still important.”
Know the location where the photo was taken within a 5′ diameter, including elevation, and eye height from the ground.
Make sure [...]
User interface related code only in User Forms
A common practice for beginning developers is to place the macro processing code in the OK (or Apply) button click event sub of a User Form. While this may be easy, and keeps everything in one spot, it is not recommended. The only code in your User Forms should be the code required to collect [...]
Working with a 3D File – Display Depth and Active Depth
Here are solutions to a couple of the most common issues we hear about.
Key-ins: (watch your prompt & message fields)
AZ=? will display your ‘active depth’ (the elevation data points will assume when drawing elements).
AZ=800.12 will set your active depth (the elevation you want to draw at).
DP=? will display the ‘vertical slice’ you are [...]
Implement VB.Net Style Error Trapping
As you may know, Microsoft is phasing out VBA and encouraging developers to start using VB.Net. Some VBA code can be imported in to VB.Net and run without any modifications, other code will require extensive modification. The On Error GoTo method of error trapping used in VBA is not supported in VB.Net. In VB.Net this [...]
Text Masking using Text Styles
When placing text in a plan sheet it is preferred that there is no line work or graphics behind the text. Having the graphics behind the text makes it difficult to read. MicroStation Text Styles allow for a background to be placed around the text to make it appear as the text is [...]
Use VBA Constants and Enums
VBA contains many internal constants and enumerated types to provide consistency and more readable code. Some programmers like to bypass these internal types and use the numeric equivalents. The most common of these practices is to use 0 and 1 for the Boolean FALSE and TRUE.
You might also be tempted to do (or run [...]