MicroStation BASIC Macros are BASIC programs that automate often-used, usually short sequences of operations. Many Bentley PowerMap-specific extensions have been added to the BASIC language to customize it for the MicroStation environment.
In its simplest form, a macro “drives” Bentley PowerMap in much the same way a human user does. Macros select tools and view controls, send key-ins, manipulate dialogs, modify elements, and more, using many of the tools documented in this guide. The obvious advantage of writing a macro to perform a task that could otherwise be done manually is automating mechanical and repetitive tasks. Several sample macros are supplied with Bentley PowerMap.
Macro code is stored in text files with .bas file extension. The macro language is BASIC with MicroStation-specific extensions. Compiled macros are stored in resource files with .ba extensions.
For information about developing your own macros, see MicroStation BASIC Help.
You can load, run, and edit a macro using the Macros dialog or a key-in.
You can define an action string that specifies a key-in that runs a macro and assign the action string to a custom tool, menu item, function key, or AccuDraw keyboard shortcut. You can customize the user interface and run frequently used macros with a single click or key press.