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
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
ExportApi
LoadEffectApi
MaterialApi
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
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
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: