OS. Run Your Code

You should now have a working piece of python code which will provide you information about the currently active STAAD.Pro model. You’ll now run the code to test it.

  1. Save your progress by either:
    • selecting File > Save
    • pressing Ctrl+S
  2. Select the Run tool to execute your code.
    The terminal will open and display the results.

It is best practice to annotate your code with comments. This allows others to easily understand what your code is doing (or at least what your intention was). The full example here contains comments accordingly.

Figure 1. Microsoft Visual Studio Code running a Python example