In MicroStation V8, Microsoft's Visual Basic for Applications (or VBA) was introduced. Although there are some similarities in concepts between MicroStation BASIC and VBA, Bentley HIGHLY recommends using VBA and not MicroStation BASIC in any MicroStation V8 version.For more information on the use of VBA, see:https://communities.bentley.com/products/microstation/w/microstation__wiki/15465/vba-programming-microstation
MicroStation BASIC is a tool to allow you to drive MicroStation. The BASIC program can select tools and view controls, send key-ins, and modify elements using the tools provided.
The goal of MicroStation BASIC is to allow you to automate many activities which you can perform interactively in MicroStation.
MicroStation BASIC was first available in MicroStation PowerDraft. MicroStation also includes BASIC. Any platform which supports these products will have BASIC available.
Yes, MicroStation BASIC is part of the MicroStation environment.
No, the input files for MicroStation BASIC are ASCII files. Any Text Editor can be used to edit them. You can use the MicroStation BASIC Editor for debugging.
Use the command Macro followed by the macro name.
If the macro does not reside in the directory(s) specified by MS_MACRO then the full path must be used.
A macro name can be specified two ways, widget.ba or widget.bas. If the .ba file extension is used, the BASIC program will not be recompiled. If the .bas file extension is used, the BASIC program will be recompiled if the source file has been updated since the last compile.
Use the command Macro with Debug followed by the macro name.
macro debug Widget
MicroStation BASIC programs are platform independent. Copy the .ba in the same way you would a DGN file to the target platform. The source file .bas does not have to be copied. If both files are present and the source has changed, the compile happens automatically.
An MDL application RunMacro is supplied in the MDL examples directory. This application will look at configuration variables and run a MicroStation BASIC program(s) as MicroStation starts. For more information on RunMacro, see \ustation\mdl\examples\runmacro\readme.txt.
This question has three parts. Macro Record is a way of creating a macro from actions take through the operator interface. The macro recorder generates BASIC code for each recordable user action. Edit is to take a recorded macro and add actions which could not be recorded. Playback of a recorded macro repeats each step recorded. In an unmodified macro there will be no interaction with the operator. All inputs were recorded are played back.
Product TechNotes and FAQs
MicroStation Desktop TechNotes and FAQs
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!