This is an example project demonstrating how to use SCIA Engineer's OpenAPI and Analysis Data Model (ADM) to programmatically:
- Create a structural analysis model
- Run linear FEM calculation
- Read the FEM calculation results
This example project is designed for both structural engineers who want to learn how to automate SCIA Engineer workflows using C# and the OpenAPI, as well as professional software developers who want to use SCIA as a background calculation engine for their projects. It provides a complete working example that creates a 3D structural model, runs calculations, and extracts results programmatically.
The example utilizes Analysis Data Model (ADM) and Open API to create a FEM structure in SCIA Engineer featuring:
-
Materials: Steel (S355) and Concrete (C30/37)
-
Cross-sections: HEA260 steel profile and 600x300mm concrete sections
-
Structural Elements:
-
5 steel columns (C1-C5) connecting ground to top level
-
3 steel beams (B1-B3) at the top level
-
2 concrete slabs: top (S1) and bottom (S2)
-
1 concrete wall (W1)
-
Slab opening (O1) in the top slab
-
Region with a different thickness in bottom slab
-
-
Supports:
- Fixed point supports (PS1-PS4) with free X-rotation at the bottom of columns C1-C4
- Fixed point support (PS5) at the bottom of column C5
- Surface support (SS1) under the bottom slab with elastic soil parameters
-
Hinges:
- Point hinges at the start and end of the beam B3 with free Y-rotation
- Linear hinges at the bottom and top of the wall
-
Loads:
- 3 load cases (LC1-LC3)
- Line loads (forces and moments) on columns and beams in load case 1 (LC1)
- Surface load on top slab and point loads on column C5 in load case 2 (LC2)
- One load combination LComb1
After creating the structure, the app sends it to SCIA Engineer and starts a linear FEM calculation. Then, results are read and printed in the console.
-
.NET Framework 4.8 developer pack
- Download from: https://dotnet.microsoft.com/download/dotnet-framework/net48
- Or use winget:
winget install Microsoft.DotNet.Framework.DeveloperPack_4.8
-
IDE
a. Microsoft Visual Studio 2022
-
Download from: https://visualstudio.microsoft.com/downloads
-
Or use winget:
winget install Microsoft.VisualStudio.2022.Community
b. Or VS Code with C# extension
-
Download from: https://code.visualstudio.com/download
-
or use winget:
winget install Microsoft.VisualStudioCode
-
See the system requirements of SCIA Engineer.
git clone https://github.com/scia-garage/open-api-adm-dotnet.git
cd open-api-adm-dotnetNote
All CLI commands we show below need to be run in this directory
Ensure SCIA Engineer is installed at the default location:
if exist "C:\Program Files\SCIA\Engineer25.0" (echo OK) else (echo Not found)Note
If SCIA Engineer is not installed under this location, you have to adapt the DLL paths in OpenAPIAndADMDemo.csproj file! See configuration.
-
With VS-Code
- Open VS-Code and go to File -> Open Folder and open the open-api-adm-dotnet folder
OR in the CLI type:code . - Wait a couple of seconds for the pop-up about installing extensions recommended for this
project to pop up or open the Extensions tab (CTRL+E) and type
@recommendedin the search field - Install all recommended extensions
- Open VS-Code and go to File -> Open Folder and open the open-api-adm-dotnet folder
-
With Visual Studio
Simply open the solution file open_api_adm_dotnet.sln
-
Using CLI
dotnet build open_api_adm_dotnet.sln
-
Or using VS-Code
The default build task is defined in the .vscode/tasks.json.
Just go to: "Terminal -> Run Build Task" or Press Ctrl+Shift+B -
Or using Visual Studio
Build with Ctrl+Shift+B
The binaries are created in OpenAPIAndADMDemo/bin/Debug/net48
dotnet run --project OpenAPIAndADMDemo- Console application starts and initializes SCIA Engineer environment
- SCIA Engineer opens automatically
- A new empty project is created
- The demo builds the complete structural model using ADM
- Model is sent to SCIA Engineer (you'll see the 3D structure)
- Press any key when prompted to run the calculation
- Linear analysis is performed
- Results are extracted and displayed in the console
- Press any key to close SCIA Engineer
-
Using VS-Code
The debug configuration is defined in .vscode/launch.json. You only need to:
- Set a breakpoint anywhere in the code
- Press F5
-
Using Visual Studio
- Set a breakpoint anywhere in the code
- Press F5
OpenAPIAndADMDemo/
βββ Program.cs # Main entry point
βββ Configuration/
β βββ ModelConstants.cs # Version and configuration settings
βββ Infrastructure/
β βββ SciaEnvironmentManager.cs # Manager for getting the SCIA installation and temp paths
β βββ SciaProcessManager.cs # Manager for killing orphan runs of SCIA Engineer
β βββ ProjectManager.cs # Managing ESA project: creating empty template, opening and closing project in SCIA
β βββ SciaAssemblyResolver.cs # DLL loading and resolution
βββ ModelBuilding/
β βββ IModelBuilder.cs # Builder pattern interface
β βββ ModelDirector.cs # Orchestrates ADM model creation
β βββ ProjectInformationBuilder.cs # Project metadata
β βββ MaterialBuilder.cs # Defining materials
β βββ CrossSectionBuilder.cs # Creating 1D-member cross-sections
β βββ GeometryBuilder.cs # It's where FEM model geometry is created
β βββ SupportBuilder.cs # Defining supports
β βββ HingeBuilder.cs # Defining hinges
β βββ LoadCaseBuilder.cs # Load case definitions
β βββ LoadBuilder.cs # Defining point, line and surface loads
β βββ LoadCombinationBuilder.cs # Load combination definitions
βββ Results/
βββ ResultsManager.cs # Results extraction and displayThe project is configured for SCIA Engineer 25.0. To use a different version:
-
Update ModelConstants.cs:
public const string SciaVersion = "24.1"; // Change to your version
-
Update .csproj file - Replace all instances of
Engineer25.0with your version:<HintPath>C:\Program Files\SCIA\Engineer24.1\OpenAPI_dll\SCIA.OpenAPI.dll</HintPath>
If SCIA Engineer is installed in a non-standard location, update the paths in OpenAPIAndADMDemo.csproj
for each <Reference> item:
<!-- Change this base path -->
<HintPath>C:\Custom\Path\SCIA\Engineer25.0\OpenAPI_dll\SCIA.OpenAPI.dll</HintPath>In ModelDirector.cs, the call .SetupDefaultMaterials() creates some basic materials.
Replace it with something like:
.AddMaterial("Steel_S275", MaterialType.Steel, "S275", 210, 80, 0.3, 7850);To build a structural analysis model with a different geometry, modify the calls of GeometryBuilder in ModelDirector.cs:
.AddNode("NewNode", x, y, z);
.AddLineMember("NewBeam", "StartNode", "EndNode", "CrossSection", Member1DType.Beam, "BeamsLayer");The same applies for supports, hinges, load cases, loads and load combinations: modify
the calls of SupportBuilder, HingeBuilder, LoadCaseBuilder, LoadBuilder and LoadCombinationBuilder
respectively.
The results are read in Program.cs using ResultsManager. Add additional calls to extract
more results. Remember to call PrintAllResults at the end
ReadMemberStresses("Beam B1 : Stresses : Load case LC1", "LC1", "B1");2025-01-23 12:34:56.7890|ERROR|SCIA.OpenAPI.AdmToAdmServiceWrapper|Server start timeout. SCIA Engineer Application must be terminated manually!SCIA Engineer didn't start within a timeout.
- Close the demo
- After some time, SCIA Engineer will eventually start. Close it.
- Restart the demo
If you are still not able to start the example, it might help moving the .exe file to the SCIA
installation folder (by default C:\Program Files\SCIA\Engineer25.0 )
This project is provided under the MIT License. See LICENSE file for details.
Note
This demo requires a valid SCIA Engineer license. The demo code is free to use, but SCIA Engineer software licensing terms apply.
This is an educational demonstration project. Always verify results with manual calculations or alternative methods before using in production structural design. The authors are not responsible for any design decisions made based on this code.