Table of Contents

IdeaStatiCa.ConnectionApi

The C# library for the Connection Rest API 3.0

  • API version: 3.0
  • SDK version: 25.1.3.1326

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 25.1" folder. Using CLI:

IdeaStatiCa.ConnectionRestApi.exe -port:5193

Parameter -port: is optional. The default port is 5000.

// 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
    {
        private static CancellationToken cancellationToken;

        public static async Task Main()
        {
            string ideaConFile = "test1.ideaCon";

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

            using (var 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;
                    }

                    // 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 Runs CBFEM calculation and returns the summary of the results.
GetRawJsonResults Gets JSON string which represents raw CBFEM results (an instance of CheckResultsData).
GetResults Gets detailed results of the CBFEM analysis.

ClientApi

Method Description
ConnectClient Connects a client to the ConnectionRestApi service and returns a unique identifier for the client.
GetVersion Gets the IdeaStatica API assembly version.

ConnectionApi

Method Description
DeleteConnection Deletes a specific connection from the project.
GetConnection Gets data about a specific connection in the project.
GetConnectionTopology Gets the topology of the connection in JSON format.
GetConnections Gets data about all connections in the project.
GetProductionCost Gets the production cost of the connection.
UpdateConnection Updates data of a specific connection in the project.

ConnectionLibraryApi

Method Description
GetDesignItemPicture Retrieves the picture associated with the specified design item as a PNG image.
GetDesignSets Retrieves a list of design sets available for the user.
GetTemplate Retrieves the template associated with the specified design set and design item.
Propose Proposes a list of design items for a specified connection within a project.
PublishConnection Publish template to Private or Company set

ConversionApi

Method Description
ChangeCode Changes the design code of the project.
GetConversionMapping Gets default conversion mappings for converting the project to a different design code.

ExportApi

Method Description
ExportIFC^ Exports the connection to IFC format.
ExportIom Exports the connection to XML which includes the OpenModelContainer (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs).
ExportIomConnectionData Gets the ConnectionData for the specified connection (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs).

LoadEffectApi

Method Description
AddLoadEffect Adds a new load effect to the connection.
DeleteLoadEffect Delete load effect loadEffectId
GetLoadEffect Gets load impulses from the specified load effect.
GetLoadEffects Gets all load effects defined in the specified connection.
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 Adds a material to the project.
AddMaterialConcrete Adds a material to the project.
AddMaterialSteel Adds a material to the project.
AddMaterialWeld Adds a material to the project.
GetAllMaterials Gets materials used in the specified project.
GetBoltAssemblies Gets bolt assemblies used in the specified project.
GetBoltGradeMaterials Gets materials used in the specified project.
GetConcreteMaterials Gets materials used in the specified project.
GetCrossSections Gets cross sections used in the specified project.
GetSteelMaterials Gets materials used in the specified project.
GetWeldingMaterials Gets materials used in the specified project.

MemberApi

Method Description
GetMember Gets information about the specified member in the connection.
GetMembers Gets information about all members in the connection.
SetBearingMember Set bearing member for memberIt
UpdateMember Updates the member in the connection with the provided data.

OperationApi

Method Description
DeleteOperations Delete all operations for the connection
GetCommonOperationProperties Gets common operation properties.
GetOperations Gets the list of operations for the connection.
PreDesignWelds Pre-designs welds in the connection.
UpdateCommonOperationProperties Updates common properties for all operations.

ParameterApi

Method Description
DeleteParameters Delete all parameters and parameter model links for the connection connectionId in the project projectId
EvaluateExpression Evaluate the expression and return the result. For more details see documentation about parameters: https://developer.ideastatica.com/docs/api/api_parameters_getting_started.html or https://developer.ideastatica.com/docs/api/api_parameter_reference_guide.html
GetParameters Gets all parameters defined for the specified project and connection.
Update Updates parameters for the specified connection in the project with the values provided.

PresentationApi

Method Description
GetDataScene3D Returns data for Scene3D visualization.
GetDataScene3DText Returns serialized data for Scene3D in JSON format.

ProjectApi

Method Description
CloseProject Closes the project and releases resources in the service.
DownloadProject^ Downloads the current IdeaCon project from the service, including all changes made by previous API calls.
GetActiveProjects Gets the list of projects in the service that were opened by the client connected via M:IdeaStatiCa.ConnectionRestApi.Controllers.ClientController.ConnectClient.
GetProjectData Get data of the project.
ImportIOM^ Create the IDEA Connection project from IOM provided in xml format. The parameter 'containerXmlFile' passed in HTTP body represents : IdeaRS.OpenModel.OpenModelContainer which is serialized to XML string by IdeaRS.OpenModel.Tools.OpenModelContainerToXml
OpenProject^ Opens an IdeaCon project from the provided file.
UpdateFromIOM^ Update the IDEA Connection project by IdeaRS.OpenModel.OpenModelContainer (model and results). IOM is passed in the body of the request as the xml string. IdeaRS.OpenModel.Tools.OpenModelContainerToXml should be used to generate the valid xml string
UpdateProjectData Updates ConProjectData of project

ReportApi

Method Description
GeneratePdf^ Generates a report for the specified connection in PDF or Word format.
GeneratePdfForMutliple^ Generates a report for multiple connections in PDF or Word format.
GenerateWord^ Generates a report for the specified connection in PDF or Word format.
GenerateWordForMultiple^ Generates a report for multiple connections in PDF or Word format.

SettingsApi

Method Description
GetSettings Gets setting values for the project.
UpdateSettings Updates one or multiple setting values in the project.

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
Delete Delete specific template
DeleteAll Delete all templates in connection
Explode Explode specific template (delete parameters, keep operations)
ExplodeAll Explode all templates (delete parameters, keep operations)
GetDefaultTemplateMapping Get the default mappings for the application of the connection template passed in templateToApply on connectionId in the project projectId
GetTemplateCommonOperationProperties Get Common properties for specific template
GetTemplateInConnection Retrieves a specific template by its ID for a given connection within a project.
GetTemplatesInConnection Retrieves a list of templates associated with a specific connection within a project.
LoadDefaults Load parameter defaults for specific template.
UpdateTemplateCommonOperationProperties Set common properties for specific template

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Notes

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