PolyBeam API is a fully programmable interface that lets you drive every aspect of PolyBeam without using the graphical user interface. You can:
- Define cross section, loads and supports programmatically
- Save and load project PolyBeam files in the native .pb2 format
- Generate PDF reports automatically
- Extract analysis results for further processing in your own tools
By embedding the PolyBeam API into your workflow, you eliminate repetitive manual steps, accelerate project delivery and ensure consistent, error-free results through automation.
How to use PolyBeam API with C#
- Download & Install
Get the latest PolyBeam release from www.PolyStruc.com/Download and follow the installer prompts - Open Your IDE
Launch Visual Studio (or any C#-capable code editor) and load your project—or create a new one. - Add the PolyBeam.Connector Package
In the NuGet Package Manager, search for and install PolyBeam.Connector. - Create a Connection
In your code, instantiate the API connection: - Invoke API Commands
Call methods on yourconnection
object to:- Define cross section, loads & supports
- Run analyses
- Save or load .pb2 project files
- Generate PDF reports
- Extract results for further processing
using PolyBeam.Connector;
var polyBeam = new PolyBeamConnection()
Small Console Application Examples
Jumpstart your PolyBeam API integration with a suite of ready-to-run console apps. Simply download the examples, open the solution in Visual Studio, and run any project to see the API in action.
Example 1: Simple Concrete Beam
Programmatically create a basic concrete beam, retrieve its utilization ratio, and save the model as a .pb2 file.
Example 2: Create PDFs for Saved Projects
Enter a directory path in the console; the app will scan for all .pb2 files, open each one, and generate a corresponding PDF report.
Example 3: Open, Modify & Retrieve Model
Launch the PolyBeam GUI, design or edit a beam interactively, then pull that updated model back into your C# code for further automation.
Download the examples and explore what you can build with the PolyBeam API!