Search

MicroStation BASIC Questions

Support

<< Return to Index
Subject: MicroStation BASIC Questions
Product: MicroStation, MicroStation PowerDraft 
Operating System: All
Document Number: 6120

Index: 

  1. What is MicroStation BASIC?
  2. What can I do with MicroStation BASIC?
  3. What Bentley products support MicroStation BASIC?
  4. Do I need MicroStation or MicroStation PowerDraft to run a BASIC program?
  5. Do I have to use the MicroStation BASIC editor?
  6. How do I start a macro from the MicroStation command line or Key-in Field?
  7. How do I start a macro with the debugger from the command line?
  8. How do I recompile the application for other platforms?
  9. How do I run a MicroStation BASIC program as a start up macro?
  10. What is Macro Record/Edit/Playback?

Question 1:  What is MicroStation BASIC?
Answer: 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.

Question 2:  What can I do with MicroStation BASIC?
Answer: The goal of MicroStation BASIC is to allow you to automate many activities which you can perform interactively in MicroStation.

Index

Question 3:  What Bentley products support MicroStation BASIC?
Answer: MicroStation BASIC was first available in MicroStation PowerDraft. MicroStation also includes BASIC. Any platform which supports these products will have BASIC available.

Question 4:  Do I need MicroStation or MicroStation PowerDraft to run a BASIC program?
Answer: Yes, MicroStation BASIC is part of the MicroStation environment.

Index

Question 5:  Do I have to use the MicroStation BASIC editor?
Answer: 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.

Question 6:  How do I start a macro from the MicroStation command line or Key-in Field?
Answer: Use the command Macro followed by the macro name.

 macro widget

If the macro does not reside in the directory(s) specified by MS_MACRO then the full path must be used.

 macro c:\MyMacros\MyWidget

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.

Index

Question 7:  How do I start a macro with the debugger from the command line?

Answer: Use the command Macro with Debug followed by the macro name.

 macro debug Widget

Question 8:  How do I recompile the application for other platforms?
Answer: 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.

Index

Question 9:  How do I run a MicroStation BASIC program as a start up macro?
Answer: 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.

Question 10:  What is Macro Record/Edit/Playback?
Answer:
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.

Index

How useful was this page?
less   more
Suggest new content or let us know how we can improve this content (optional):

<< E-mail this page