API Reference
Armatura's API is project-first: create an ArmaturaProject, attach a StructuralModel, then run analysis and design checks.
info
StructuralModel.RunAnalysis(...) requires the model to be attached to a project.
Core types
ArmaturaProject— manages models, active design code, scenario evaluation, and persistence.StructuralModel— geometry, materials/sections, supports, load cases/combinations.AnalysisResult/AnalysisResultSet— per-run results and immutable multi-scenario result views.EvaluationResult— design-code checks over one scenario or an envelope.
Typical workflow
using SamLabs.Armatura.Core;
using SamLabs.Armatura.Core.DesignCodes.Eurocode;
using SamLabs.Armatura.Core.Geometry;
using SamLabs.Armatura.Core.Structural;
using SamLabs.Armatura.Core.Structural.Loads;
using SamLabs.Armatura.Core.Structural.Loads.Applied;
using SamLabs.Armatura.Core.Structural.Materials;
using SamLabs.Armatura.Core.Structural.Member;
using SamLabs.Armatura.Core.Structural.Sections.Definitions;
var project = new ArmaturaProject("Tower");
project.ActiveDesignCode = new EN1993();
var model = project.CreateNewModel("Frame A");
var n1 = model.AddNode(0, 0, 0);
var n2 = model.AddNode(0, 0, 6);
var steel = SteelLibrary.S355;
var section = new HollowCircularSection(0.1937, 0.008);
var m = model.AddMember(n1, n2, steel, section, MemberType.Beam);
model.SetSupport(n1, DoF.Fixed);
var dead = new DeadLoadCase("G") { IncludeSelfWeight = true };
model.AddLoadCase(dead);
model.AddPointLoad(new PointLoad
{
Member = m,
Case = dead,
Position = 1.0,
PositionMode = PositionMode.Relative,
Force = new Point3D(0, 0, -15_000)
});
var analysis = model.RunAnalysis(dead);
var evaluation = model.Evaluate(analysis, dead.Name);
project.Save("./Tower.armatura");
Units
Armatura works in consistent SI units throughout. There is no built-in unit conversion.
| Quantity | Unit |
|---|---|
| Length | metres (m) |
| Force | Newtons (N) |
| Stress / modulus | Pascals (Pa) |
| Moment | Newton-metres (N·m) |
| Moment of inertia | m⁴ |
| Distributed load | N/m |
Passing inconsistent units (e.g., mm for lengths but Pa for stress) will produce incorrect results without warning.
Result invalidation
model.Results is cleared whenever model-defining data changes (nodes, members, supports, loads, load cases/combinations). Re-run analysis or call BuildResultSet() after mutations.
What to read next
- Model — geometry and properties
- Loads — load case and combination setup
- Analysis — running analysis, result sets, and envelopes
- Design Checks — evaluation and utilization interpretation
- Serialization —
.armaturasave/load format