IdeaStatiCa.RcsApi
The C# library for the RCS Rest API 1.0
- API version: 1.0
- SDK version: 25.1.5.1431
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 25.1" 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.1"; // 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 |
| GetRawResults | Get calculated results in XML format |
| GetResults | Get calculated results |
ClientApi
| Method | Description |
|---|---|
| GetVersion | Get the IdeaStatica version |
CrossSectionApi
| Method | Description |
|---|---|
| AddReinforcedCrossSection | Add a new reinforced cross-section to the project from embedded geometry |
| GetReinforcedCrossSectionData | Get reinforced cross-section with full geometry (IOM format) |
| ImportReinforcedCrossSection | Import reinforced cross-section from template |
| ReinforcedCrossSections | Get reinforced cross sections |
DesignMemberApi
| Method | Description |
|---|---|
| Members | Get members |
InternalForcesApi
| Method | Description |
|---|---|
| GetSectionLoading | Get section loading |
| SetSectionLoading | Set section loading |
MaterialApi
| Method | Description |
|---|---|
| AddConcreteMaterial | Add a new material to the project. The material type is determined by the endpoint path. |
| AddPrestressMaterial | Add a new material to the project. The material type is determined by the endpoint path. |
| AddReinforcementMaterial | Add a new material to the project. The material type is determined by the endpoint path. |
| GetAllMaterials | Get materials from the project. Use specific path to filter by material type. |
| GetConcreteMaterials | Get materials from the project. Use specific path to filter by material type. |
| GetPrestressMaterials | Get materials from the project. Use specific path to filter by material type. |
| GetReinforcementMaterials | Get materials from the project. Use specific path to filter by material type. |
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 | |
| GetCodeSettingsJson | |
| 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
- Model.CalculationType
- Model.CheckResult
- Model.CheckResultType
- Model.ConcreteCheckResult
- Model.ConcreteCheckResultBase
- Model.ConcreteCheckResultOverall
- Model.ConcreteCheckResultOverallItem
- Model.ConcreteCheckResults
- Model.FatigueTypeOfPrestressingSteel
- Model.Loading
- Model.LoadingType
- Model.MaterialDuct
- Model.NonConformity
- Model.NonConformityIssue
- Model.NonConformitySeverity
- Model.OpenElementId
- Model.Point2D
- Model.PolyLine2D
- Model.RcsCalculationParameters
- Model.RcsCheckMember
- Model.RcsCrossSectionData
- Model.RcsCssComponentData
- Model.RcsMprlElement
- Model.RcsProject
- Model.RcsProjectData
- Model.RcsReinforcedBarData
- Model.RcsReinforcedCrossSection
- Model.RcsReinforcedCrossSectionImportData
- Model.RcsReinforcedCrosssSectionImportSetting
- Model.RcsResultParameters
- Model.RcsSection
- Model.RcsSectionLoading
- Model.RcsSectionResultDetailed
- Model.RcsSectionResultOverview
- Model.RcsSetting
- Model.RcsStirrupsData
- Model.RcsTendonBarData
- Model.RcsTendonDuctData
- Model.ReferenceElement
- Model.Region2D
- Model.ReinforcedBar
- Model.ReinforcedCrossSection
- Model.ReinforcedCrossSectionData
- Model.ResultOfInternalForces
- Model.ResultOfLoading
- Model.ResultOfLoadingItem
- Model.SectionConcreteCheckResult
- Model.Segment2D
- Model.Stirrup
- Model.TendonBar
- Model.TendonBarType
- Model.TendonDuct
Documentation for Authorization
Endpoints do not require authorization.
Notes
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- SDK version: 25.1.5.1431
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://github.com/idea-statica/ideastatica-public