Table of Contents

IdeaStatiCa.ConnectionApi

The C# library for the Connection Rest API 1.0

  • API version: 1.0
  • SDK version: 24.1.3.2377

IDEA StatiCa Connection API, used for the automated design and calculation of steel connections.

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.ConnectionApi

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 ConRestApiClient.sln

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

Usage

ClientApiClientFactory 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.ConnectionRestApi.exe -port:5193
// Connect any new service to latest version of IDEA StatiCa.
ConnectionApiServiceAttacher clientFactory = new ConnectionApiServiceAttacher('http://localhost:5000/');
IConnectionApiClient 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.Connection.Model;
using IdeaStatiCa.ConnectionApi;

namespace Example
{
    public class Example
    {
        public static void Main()
        {
            string ideaConFile = "test1.ideaCon";

            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 25.0"; // path to the IdeaStatiCa.ConnectionRestApi.exe

            using(clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                // create ConnectionApiClient
                using (var conClient = await _clientFactory.CreateApiClient())
                {
                    // open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile, cancellationToken);

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

                    // request to run plastic CBFEM for all connections in the project
                    ConCalculationParameter conCalcParam = new ConCalculationParameter()
                    {
                        AnalysisType = ConAnalysisTypeEnum.Stress_Strain,
                        ConnectionIds = projData.Connections.Select(c => c.Id).ToList()
                    };

                    var cbfemResult = await conClient.Calculation.CalculateAsync(projData.ProjectId, conCalcParam, 0, cancellationToken);
                    await conClient.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 Run CBFEM caluclation and return the summary of the results
GetRawJsonResults Get json string which represents raw CBFEM results (an instance of CheckResultsData)
GetResults Get detailed results of the CBFEM analysis

ClientApi

Method Description
ConnectClient Connect a client to the ConnectionRestApi service. Method returns a unique identifier of the client.
GetVersion Get the IdeaStatica version

ConnectionApi

Method Description
GetConnection Get data about a specific connection in the project
GetConnections Get data about all connections in the project
GetProductionCost Get production cost of the connection
UpdateConnection Update data of a specific connection in the project

ExportApi

Method Description
ExportIFC^ Export connection to IFC format
ExportIom Export connection to XML which includes https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs
ExportIomConnectionData Get https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs for required connection

LoadEffectApi

Method Description
AddLoadEffect Add new load effect to the connection
DeleteLoadEffect Delete load effect loadEffectId
GetLoadEffect Get load impulses from loadEffectId
GetLoadEffects Get all load effects which are defined in connectionId
GetLoadSettings Get Load settings for connection in project
SetLoadSettings Set Load settings for connection in project
UpdateLoadEffect Update load impulses in conLoading

MaterialApi

Method Description
AddBoltAssembly Add bolt assembly to the project
AddCrossSection Add cross section to the project
AddMaterialBoltGrade Add material to the project
AddMaterialConcrete Add material to the project
AddMaterialSteel Add material to the project
AddMaterialWeld Add material to the project
GetAllMaterials Get materials which are used in the project projectId
GetBoltAssemblies Get bolt assemblies which are used in the project projectId
GetBoltGradeMaterials Get materials which are used in the project projectId
GetConcreteMaterials Get materials which are used in the project projectId
GetCrossSections Get cross sections which are used in the project projectId
GetSteelMaterials Get materials which are used in the project projectId
GetWeldingMaterials Get materials which are used in the project projectId

MemberApi

Method Description
GetMember Get information about the requires member in the connection
GetMembers Get information about all members in the connection
SetBearingMember Set bearing member for memberIt
UpdateMember Update the member in the connection by newMemberData

OperationApi

Method Description
DeleteOperations Delete all operations for the connection
GetCommonOperationProperties Get common operation properties
GetOperations Get the list of operations for the connection
UpdateCommonOperationProperties Update common properties for all operations

ParameterApi

Method Description
EvaluateExpression Evaluate the expression and return the result
GetParameters Get all parameters which are defined for projectId and connectionId
UpdateParameters Update parameters for the connection connectionId in the project projectId by values passed in parameters

PresentationApi

Method Description
GetDataScene3D Returns data for scene3D
GetDataScene3DText Return serialized data for scene3D in json format

ProjectApi

Method Description
CloseProject Close the project. Needed for releasing resources in the service.
DownloadProject^ Download the actual ideacon project from the service. It includes alle changes which were made by previous API calls.
GetActiveProjects Get the list of projects in the service which were opened by the client which was connected by M:IdeaStatiCa.ConnectionRestApi.Controllers.ClientController.ConnectClient
GetProjectData Get data of the project.
GetSetup Get setup from project
ImportIOM^ Create the IDEA Connection project from IOM provided in xml format. The parameter 'containerXmlFile' passed in HTTP body represents : <see href="https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs">IdeaRS.OpenModel.OpenModelContainer which is serialized to XML string by <see href="https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Tools.cs">IdeaRS.OpenModel.Tools.OpenModelContainerToXml
OpenProject^ Open ideacon project from ideaConFile
UpdateFromIOM^ Update the IDEA Connection project by <see href="https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs">IdeaRS.OpenModel.OpenModelContainer (model and results). IOM is passed in the body of the request as the xml string. <see href="https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Tools.cs">IdeaRS.OpenModel.Tools.OpenModelContainerToXml should be used to generate the valid xml string
UpdateProjectData Updates ConProjectData of project
UpdateSetup Update setup of the project

ReportApi

Method Description
GeneratePdf^ Generates report for projectId and connectionId
GenerateWord^ Generates report for projectId and connectionId

TemplateApi

Method Description
ApplyTemplate Apply the connection template applyTemplateParam on the connection connectionId in the project projectId
CreateConTemplate Create a template for the connection connectionId in the project projectId
GetDefaultTemplateMapping Get the default mappings for the application of the connection template passed in templateToApply on connectionId in the project projectId

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Notes

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