OS. Run Your Code

You should now have a working piece of C# 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. Press Ctrl+F5 to run your project.
    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 2019 running a C# example