STAAD.Pro Help

OS. To test your macro

You can add break points through your code to assist in debugging. Practice adding one so you can read the debug print output you added.

If the program contains errors, the line where the program stops will be marked in red. Stop the program and then review your input to debug.

  1. Click in the dark gray margin of the code editor just to the left of line number 57 (or the line containing cdrx = 0). A red dot appears to indicate this is a break point. The code will pause the execution at this point when executed.
  2. Click the Run tool in the Execute group.

    The user dialog opens for input.
  3. Change one or more values from their defaults.
  4. Click OK. The code runs to the break point, which is now highlighted in yellow. The Immediate tab now shows the debug print statements. These should reflect any changed input you provided.
  5. Click the Run tool in the Execute group again to continue to the next break point or to the end of the code.
  6. Save your changes.
  7. Select the File ribbon tab and then select Exit in the backstage view.
Your new macro is shown in the Macro dialog list.
Note: Testing the macro still runs within STAAD.Pro through OpenSTAAD, so you will have a frame generated if you tested it. You will need to start with a new, empty file to run the macro correctly.