StaadPro.Interop.Core 1.0.0-preview.20261206.1

This is a prerelease version of StaadPro.Interop.Core.
dotnet add package StaadPro.Interop.Core --version 1.0.0-preview.20261206.1
                    
NuGet\Install-Package StaadPro.Interop.Core -Version 1.0.0-preview.20261206.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StaadPro.Interop.Core" Version="1.0.0-preview.20261206.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StaadPro.Interop.Core" Version="1.0.0-preview.20261206.1" />
                    
Directory.Packages.props
<PackageReference Include="StaadPro.Interop.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StaadPro.Interop.Core --version 1.0.0-preview.20261206.1
                    
#r "nuget: StaadPro.Interop.Core, 1.0.0-preview.20261206.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StaadPro.Interop.Core@1.0.0-preview.20261206.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StaadPro.Interop.Core&version=1.0.0-preview.20261206.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=StaadPro.Interop.Core&version=1.0.0-preview.20261206.1&prerelease
                    
Install as a Cake Tool

StaadPro.Interop.Core

StaadPro.Interop.Core: OpenSTAAD for C# and .NET 9

Build and Test Core NuGet latest preview License: Apache 2.0 .NET 9.0 Windows

StaadPro.Interop.Core is an open-source, strongly typed C# OpenSTAAD wrapper for Bentley STAAD.Pro on Windows .NET 9 (.NET Core). Attach to a STAAD.Pro session, check process/model identity, and read cached native version, model units and application-window metadata with detailed XML IntelliSense.

By Srinivasa Rao Masanam. Published by StruXllence.

YouTube Website Forum Forum preview

StruXllence themes for Visual Studio Code

Install StruXllence Themes from Visual Studio Marketplace

Code your C# and OpenSTAAD tools with StruXllence Themes, a dark and light Visual Studio Code theme suite with matching file and product icons by Srinivasa Rao Masanam.

Install StruXllence Themes from the Visual Studio Marketplace or use the command line:

code --install-extension StruXllence.struxllence-themes
# For VS Code Insiders:
code-insiders --install-extension StruXllence.struxllence-themes

After installation, run Preferences: Color Theme and select StruXllence Dark or StruXllence Light. See the theme previews and icon setup. The editor theme is optional and is installed separately from the NuGet library.

Install the OpenSTAAD C# package

Install the latest published preview from NuGet.org:

dotnet add ./YourApp.csproj package StaadPro.Interop.Core --prerelease --source https://api.nuget.org/v3/index.json

In Visual Studio's NuGet Package Manager, enable Include prerelease and search for StaadPro.Interop.Core. Target net9.0-windows and use an STA entry point for native automation. The NuGet badge tracks the latest public preview; see the installation guide for exact-version and local-feed instructions.

Version 1.0.0-preview.20261206.1

This Core preview contains wrapper/acquisition infrastructure and 53 common Root contracts and three optional Root operations: metadata, model/process and path observations, model/application requests, job-information snapshots and updates, window controls, input-unit changes, model coordination and analysis requests/status. Geometry provides 94 operations, including node coordinate edits, group creation and discovery, single and batch analytical entity creation, and annular surfaces. Node and group editing. Analytical entity creation. Parametric surfaces and guided supports. IdentifyPhysicalMembers and GroupPhysicalMembersByPlanAngle build detached runs and angle groups. IsZUp, GetGlobalVerticalAxis and GetParametricSurfaceCount read the active model. Physical-member and model queries. See the connectivity guide. See supplied-node hydration and inventory tasks, generic model and ID queries, generic selection, member and plate incidence, beam and plate selection, node selection and model-wide inventories. Output includes pointwise plate stress and offset-aware global member-end forces, including transfer to the physical incidence joint. See the point stress and member-offset guide. See the plate cut-line guide for axis selection and failure handling. See load-case metadata for Boolean/count separation, bounded inventories, family identity and detached records. Load provides nineteen metadata, filter, envelope and combination-definition contracts; Output provides eighty-five availability, member-end force, buckling, steel-design, support-reaction/force, static-check and plate-center/corner stress and force contracts, including complete reported steel records and governing-member selection. See load definitions for classifications, membership and ordinary coefficients, and buckling results for factors and six-component mode vectors, and steel-design queries for ratio sentinels and owning-thread task semantics. See member batch queries for captured IDs, reference-key dictionaries, two-stage managed population and task execution. See steel-design records for status/case/force qualification and supplied physical-member ranking. See support reactions and static checks for six-component signs, copied records and settled tasks on the owning COM thread. See static-check batches and plate-center stresses for duplicate observations, sequential compatibility calls, stress units and result context. See plate moments and surface stresses for native units, surface/output order, scalar model scope and qualification. See plate-center composite results for component selection, captured identities, Cartesian order and complete-result behavior. See plate-corner forces for node-number selection, optional single-corner hydration, batch deduplication, captured-key indexes and native status differences. See the member-local frame and force examples. Property, Support, Design, Commands, Table, View and IDEA StatiCa adapters expose their native bindings. The standalone guided pin formatter emits culture-invariant STAAD input without a wrapper. SlotDofRestraint.Spring creates a validated stiffness value. SlotBaseRestraints.GuidedPin creates an ordinary six-degree restraint.

The package targets net9.0-windows. It has no dependency on the Framework StaadPro.Interop package, WPF or Newtonsoft.Json. Live use requires a separately installed, licensed STAAD.Pro application with compatible OpenSTAAD members. Build/package checks do not certify every native build or licensing state.

Connect to STAAD.Pro from C#

The default factory verifies the hosting process, native model identity and Geometry/Load readiness. It prefers an already-open requested model, then a reachable verified blank, then a permitted newly opened target. A returned blank remains blank; the requested target is not opened into it. Use Acquire() when the outcome matters.

using System;
using StaadPro.Interop.Core.Services;

internal static class Program
{
    [STAThread]
    private static void Main()
    {
        var result = OpenStaadWrapperProvider.Acquire(@"C:/Models/Structure.std");
        if (!result.Succeeded)
        {
            Console.WriteLine(result.Failure);
            foreach (string message in result.Diagnostics) Console.WriteLine(message);
            return;
        }
        using var wrapper = result.Wrapper;
        Console.WriteLine($"{result.Outcome}: '{result.ActualPath}'");
        var root = wrapper.Root;
        Console.WriteLine(root.GetApplicationVersion()?.Display);
        Console.WriteLine(root.GetBaseUnit());
        Console.WriteLine(root.GetInputUnitForForce());
        Console.WriteLine(root.GetInputUnitForLength());
        Console.WriteLine(root.GetMainWindowHandle());
        Console.WriteLine(root.GetStaadFileFullPath());
        Console.WriteLine(root.GetStaadFileFolder());
        Console.WriteLine(root.IsPhysicalModel());
        Console.WriteLine(root.GetErrorMessage());
        Console.WriteLine(root.GetProcessId());
    }
}

Get(path) returns a wrapper or throws OpenStaadAcquisitionException with diagnostic evidence. GetRunning() attaches only and never starts STAAD. The static Acquire()/Get() without a path attaches first; when no supported application exists, installed-executable lookup can enable creation of a temporary STD model. The advanced OpenStaadSessionProvider.Acquire() without a path remains attachment only.

Create, use and dispose connections on the appropriate Windows STA thread. Wrapper refresh/live disposal enforce their constructing thread and reject reentrancy. Raw native objects remain outside managed thread/operation validation. Synchronous COM calls cannot be forcibly interrupted by the logical timeout. A missing license, inaccessible root or hung application can prevent acquisition; failures are reported rather than disguised as successful wrappers.

Root metadata and IntelliSense

The five metadata methods reuse wrapper snapshots without COM dispatch. GetApplicationVersion() returns an independent native version, distinct from the host assembly version. Input units can be compatibility fallbacks; the handle is borrowed and may be zero or stale. RefreshUnits() updates units while retaining Root. After RefreshComObjects(), reacquire wrapper.Root: retained adapters are rejected. Root reads also reject disposal, another thread and reads during refresh. See the Root metadata contracts.

The five live Root observations each issue one native query. Path/folder/error text is preserved exactly; unwritten or malformed text is rejected rather than treated as a blank. Physical-model flags and process IDs are validated without coercing arbitrary values. All managed Root reads share binding, thread and reentrancy guards. A PID is a live identifier; the cached window handle is a different value. Error-message reads retain native state semantics.

Passed 1,955 offline tests. Installed-package verification compiles 173 XML examples, README usage and all fifteen Root/domain guides, checks all 53 common Root contracts and three optional operations and exercises explicit edits against a managed native stand-in. Earlier read-only named-session and same-process target-reuse checks succeeded on STAAD.Pro 26.00.01.491 without startup. This increment performs no live model mutation or new native qualification; cross-version/startup and engineering acceptance remain separate.

Model paths and identity

Use GetStaadFileNameOnly() for the current filename, GetAnlFileFullPath() for the expected .ANL path and GetOpenedStaadFilename() for an absolute normalized path. IsTarget(string staadFileFullPath) and ModelIsOpen(string fileFullPath) compare complete paths, including directories. Each helper makes one native filename query. An explicitly blank session returns empty/false; malformed output throws. The analysis path is a prediction and does not prove results exist. See the path-helper contracts and C# examples.

Common questions

Can I use OpenSTAAD with .NET Core?

This package targets Windows .NET 9 (net9.0-windows), using late-bound COM access without a Bentley interop-assembly dependency. It requires the Windows .NET runtime and compatible installed STAAD.Pro; it does not run on Linux or macOS. For the separate .NET Framework package, see StaadPro.Interop.

Does this preview automate geometry, loads or analysis?

Where can I find examples or report an issue?

Start with the installation guide, C# Root examples and wrapper/acquisition design. Report reproducible defects through GitHub Issues, or join the StruXllence community forum for discussion.

This project is independent and is neither affiliated with, sponsored by nor endorsed by Bentley Systems. Bentley, STAAD, STAAD.Pro and OpenSTAAD names and marks belong to their respective owners. Apache-2.0 applies with the retained MIT-origin notice; see LICENSE, NOTICE and trademark guidance. Copyright (c) 2026 StruXllence.

Product Compatible and additional computed target framework versions.
.NET net9.0-windows7.0 is compatible.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.20261206.1 0 12/6/2026
1.0.0-preview.20261206 0 12/5/2026
1.0.0-preview.20261205.1 42 12/5/2026
1.0.0-preview.20261205 44 12/5/2026
1.0.0-preview.20261204.1 41 12/4/2026
1.0.0-preview.20261204 48 12/4/2026
1.0.0-preview.20261203.1 47 12/3/2026
1.0.0-preview.20261203 49 12/3/2026
1.0.0-preview.20261202.1 46 12/2/2026
1.0.0-preview.20261202 48 12/2/2026
1.0.0-preview.20261201.1 53 12/1/2026
1.0.0-preview.20261201 60 12/1/2026
1.0.0-preview.20261130.1 54 12/1/2026
1.0.0-preview.20261130 64 11/30/2026
1.0.0-preview.20261129.1 67 11/29/2026
1.0.0-preview.20261129 64 11/29/2026
1.0.0-preview.20261128.3 62 11/28/2026
1.0.0-preview.20261128.2 69 11/28/2026
1.0.0-preview.20261128.1 69 11/27/2026
1.0.0-preview.20261128 62 11/27/2026
Loading failed

Added node coordinate editing, group creation and group name queries with qualified native read-back. Geometry provides 94 contracts with XML IntelliSense.