Table of Contents

IdeaStatiCa.RcsApi

The C# library for the RCS Rest API 1.0

  • API version: 1.0
  • SDK version: 24.1.3.2377

IDEA StatiCa RCS API, used for the automated design and calculation of reinforced concrete sections.

Frameworks supported

  • .NET Standard >=2.0

Installation

NuGet package

We recommend installing the package to your project using NuGet. This will ensure all dependencies are automatically installed. See IdeaStatiCa.RcsApi

Building from source

Generate the DLL using your preferred tool (e.g. dotnet build) or opening the avaliable Visual Studio solution (.sln) and building. See RcsRestApiClient.sln

Projects can be created by the template or the the wizard in Visual Studio. See Rcs Rest API client wizard.

Usage

RcsApiServiceAttacher manages creation of clients on the running service. We currently only support connecting to a service running on a localhost (eg. 'http://localhost:5000/').

To start the service, manually navigate to the "C:\Program Files\IDEA StatiCa\StatiCa 24.0" folder. Using CLI:

IdeaStatiCa.RcsRestApi.exe -port:5000
// Connect any new service to latest version of IDEA StatiCa.
RcsApiServiceAttacher clientFactory = new RcsApiServiceAttacher('http://localhost:5000/');
IRcsApiClient conClient = await clientFactory.CreateApiClient();

Getting Started

The below snippet shows a simple getting started example which opens an IDEA StatiCa Connection project and performs the calculation.

using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.Api.Common;
using IdeaStatiCa.Api.RCS.Model;
using IdeaStatiCa.RcsApi;

namespace Example
{
    public class Example
    {
        public static void Main()
        {
            string rcsFile = "myRcsProject.ideaRcs"; // path to the RCS project file
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 25.0"; // path to the IdeaStatiCa.ConnectionRestApi.exe

            // Create client factory object. The service will be automatically started at the latest version of IDEA StatiCa.  
            using(var clientFactory = new RcsApiServiceRunner(ideaStatiCaPath))
            {  
                //Creates automatically configured API client.
                using (var rcsClient = await clientFactory.CreateApiClient())
                {
                    // open the project and get its id
                    var projData = await rcsClient.Project.OpenProjectAsync(rcsFile, cancellationToken);

                    if(!projData.Sections.Any())
                    {
                        return null;
                    }

                    RcsCalculationParameters rcsCalcParam = new RcsCalculationParameters()
                    {
                        Sections = projData.Sections.Select(s => s.Id).ToList()
                    };
                    
                    var rcsSectResults = await rcsClient.Calculation.CalculateAsync(projData.ProjectId, rcsCalcParam, 0, cancellationToken);

                    await rcsClient.Project.CloseProjectAsync(projData.ProjectId);
                }
            }
        }
    }
}

Documentation for API Endpoints

The ConnectionApiClient wraps all API endpoing controllers into object based or action baseds API endpoints.

Methods marked with an ^ denote that they have an additional extension in the Client.

CalculationApi

Method Description
Calculate Calculate RCS project
GetResults Get calculated results

CrossSectionApi

Method Description
ImportReinforcedCrossSection Import reinforced cross-section
ReinforcedCrossSections Get reinforced cross sections

DesignMemberApi

Method Description
Members Get members

InternalForcesApi

Method Description
GetSectionLoading Get section loading
SetSectionLoading Set section loading

ProjectApi

Method Description
CloseProject
DownloadProject Download the actual rcs project from the service. It includes all changes which were made by previous API calls.
GetActiveProject
GetCodeSettings
ImportIOM
ImportIOMFile
Open
OpenProject Open Rcs project from rcsFile
UpdateCodeSettings

SectionApi

Method Description
Sections Get sections
UpdateSection Update a section in the RCS project

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Notes

This C# SDK is automatically generated by the OpenAPI Generator project: