Table of Contents

CalculationApi

Method Description
CalculateAsync Runs CBFEM calculation and returns the summary of the results.
CalculateConnectionAsync Runs CBFEM calculation of a single connection and returns the summary of the results.
GetConnectionRawJsonResultsAsync Runs CBFEM calculation of a single connection and gets a JSON string which represents its raw CBFEM results (an instance of CheckResultsData).
GetRawJsonResultsAsync Gets JSON string which represents raw CBFEM results (an instance of CheckResultsData).
GetResultsAsync Gets detailed results of the CBFEM analysis.

CalculateAsync

List<ConResultSummary> CalculateAsync (Guid projectId, List requestBody)

Runs CBFEM calculation and returns the summary of the results.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
requestBody List<int> List of connection IDs to calculate.

Return type

List<ConResultSummary>

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class CalculateAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    var requestBody = new List<int>(); // List<int> | List of connection IDs to calculate.

                    try
                    {
                        // Runs CBFEM calculation and returns the summary of the results.
                        List<ConResultSummary> result = await conClient.Calculation.CalculateAsync(projectId, requestBody);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Calculation.CalculateAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.Api.Connection.Model;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Runs the CBFEM calculation of all connections in the project and prints the summary of the results.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task Calculate(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple knee connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all connections in the project.
            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            List<int> connectionIds = connections.Select(c => c.Id).ToList();

            //Run the CBFEM calculation and get the summary of the results.
            List<ConResultSummary> results = await conClient.Calculation.CalculateAsync(conClient.ActiveProjectId, connectionIds);

            foreach (ConResultSummary result in results)
            {
                Console.WriteLine($"Connection {result.Id} passed: {result.Passed}");

                foreach (var summary in result.ResultSummary)
                {
                    Console.WriteLine($"  Name: {summary.Name}, CheckValue: {summary.CheckValue}, CheckStatus: {summary.CheckStatus}");
                }
            }

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/connections/calculate

Using the CalculateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Runs CBFEM calculation and returns the summary of the results.
    ApiResponse<List<ConResultSummary>> response = conClient.Calculation.CalculateWithHttpInfo(projectId, requestBody);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling CalculationApi.CalculateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CalculateConnectionAsync

ConResultSummary CalculateConnectionAsync (Guid projectId, int connectionId, List loadEffectIds = null)

Runs CBFEM calculation of a single connection and returns the summary of the results.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
connectionId int The ID of the connection to calculate.
loadEffectIds List<int> Optional subset of load-effect ids of this connection to solve. When set, exactly these load effects are analysed - their Active flags are ignored and nothing is persisted; results - including subsequent results, raw-results, result-mesh and report reads - reflect only this subset until the next calculation. When omitted, all active load effects are solved; an empty list is treated as omitted. Unknown ids are rejected with 422. [optional]

Return type

ConResultSummary

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class CalculateConnectionAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    connectionId = 56;  // int | The ID of the connection to calculate.
                    var loadEffectIds = new List<int>(); // List<int> | Optional subset of load-effect ids of this connection to solve. When set,              exactly these load effects are analysed - their Active flags are ignored and nothing is persisted;              results - including subsequent results, raw-results, result-mesh and report reads - reflect only              this subset until the next calculation. When omitted, all active load effects are solved; an empty              list is treated as omitted. Unknown ids are rejected with 422. (optional) 

                    try
                    {
                        // Runs CBFEM calculation of a single connection and returns the summary of the results.
                        ConResultSummary result = await conClient.Calculation.CalculateConnectionAsync(projectId, connectionId, loadEffectIds);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Calculation.CalculateConnectionAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

Warning

It looks like the sample you are looking for does not exist.

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/connections/{connectionId}/calculate

Using the CalculateConnectionWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Runs CBFEM calculation of a single connection and returns the summary of the results.
    ApiResponse<ConResultSummary> response = conClient.Calculation.CalculateConnectionWithHttpInfo(projectId, connectionId, loadEffectIds);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling CalculationApi.CalculateConnectionWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetConnectionRawJsonResultsAsync

string GetConnectionRawJsonResultsAsync (Guid projectId, int connectionId, List loadEffectIds = null)

Runs CBFEM calculation of a single connection and gets a JSON string which represents its raw CBFEM results (an instance of CheckResultsData).

See the bulk rawresults-text endpoint remarks for the bolt-identifier and forcesAllLoadCases-key semantics; they apply here unchanged.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
connectionId int The ID of the connection to calculate.
loadEffectIds List<int> Optional subset of load-effect ids of this connection to solve. When set, exactly these load effects are analysed - their Active flags are ignored and nothing is persisted; results - including subsequent results, raw-results, result-mesh and report reads - reflect only this subset until the next calculation. When omitted, all active load effects are solved; an empty list is treated as omitted. Unknown ids are rejected with 422. [optional]

Return type

string

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GetConnectionRawJsonResultsAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    connectionId = 56;  // int | The ID of the connection to calculate.
                    var loadEffectIds = new List<int>(); // List<int> | Optional subset of load-effect ids of this connection to solve. When set,              exactly these load effects are analysed - their Active flags are ignored and nothing is persisted;              results - including subsequent results, raw-results, result-mesh and report reads - reflect only              this subset until the next calculation. When omitted, all active load effects are solved; an empty              list is treated as omitted. Unknown ids are rejected with 422. (optional) 

                    try
                    {
                        // Runs CBFEM calculation of a single connection and gets a JSON string which represents its raw  CBFEM results (an instance of CheckResultsData).
                        string result = await conClient.Calculation.GetConnectionRawJsonResultsAsync(projectId, connectionId, loadEffectIds);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Calculation.GetConnectionRawJsonResultsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

Warning

It looks like the sample you are looking for does not exist.

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/connections/{connectionId}/rawresults-text

Using the GetConnectionRawJsonResultsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Runs CBFEM calculation of a single connection and gets a JSON string which represents its raw  CBFEM results (an instance of CheckResultsData).
    ApiResponse<string> response = conClient.Calculation.GetConnectionRawJsonResultsWithHttpInfo(projectId, connectionId, loadEffectIds);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling CalculationApi.GetConnectionRawJsonResultsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetRawJsonResultsAsync

List<string> GetRawJsonResultsAsync (Guid projectId, List requestBody)

Gets JSON string which represents raw CBFEM results (an instance of CheckResultsData).

Bolt identifiers: Bolt keys in the raw results (e.g., in boltCheckResDataTimbers) are opaque internal CBFEM solver identifiers. They may start at any number, are not necessarily sequential, and may contain gaps. When a user explodes a bolt group or modifies bolt positions, the identifiers may shift. Do not assume bolt keys start at 1 or can be used as array indices. To map bolts to sequential positions, sort the keys numerically and use the resulting order. forcesAllLoadCases dictionary keys: In the per-bolt results within boltCheckResDataTimbers, the forcesAllLoadCases dictionary is keyed by the load case's internal numeric identifier (as a string). The key is not always \"1\" — it corresponds to the load case ID. For example, if only load case LE2 is active, the sole key will be \"2\". API consumers should iterate over available keys rather than assuming a specific key value.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
requestBody List<int> List of connection IDs to calculate.

Return type

List

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GetRawJsonResultsAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    var requestBody = new List<int>(); // List<int> | List of connection IDs to calculate.

                    try
                    {
                        // Gets JSON string which represents raw CBFEM results (an instance of CheckResultsData).
                        List<string> result = await conClient.Calculation.GetRawJsonResultsAsync(projectId, requestBody);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Calculation.GetRawJsonResultsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Gets the raw CBFEM results (a serialized instance of CheckResultsData) as a JSON string and saves it to a file.
        /// The calculation is run by the service automatically when the raw results are requested.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetRawJsonResults(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            List<int> connectionIds = new List<int> { connections[0].Id };

            //Get the raw CBFEM results. One JSON string is returned for each requested connection.
            List<string> rawJsonResults = await conClient.Calculation.GetRawJsonResultsAsync(conClient.ActiveProjectId, connectionIds);

            string exampleFolder = GetExampleFolderPathOnDesktop("GetRawJsonResults");

            for (int i = 0; i < rawJsonResults.Count; i++)
            {
                string jsonFilePath = Path.Combine(exampleFolder, $"raw-results-connection-{connectionIds[i]}.json");
                await File.WriteAllTextAsync(jsonFilePath, rawJsonResults[i]);

                Console.WriteLine($"Raw results of connection {connectionIds[i]} ({rawJsonResults[i].Length} characters) saved to: {jsonFilePath}");
            }

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/connections/rawresults-text

Using the GetRawJsonResultsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Gets JSON string which represents raw CBFEM results (an instance of CheckResultsData).
    ApiResponse<List<string>> response = conClient.Calculation.GetRawJsonResultsWithHttpInfo(projectId, requestBody);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling CalculationApi.GetRawJsonResultsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetResultsAsync

List<ConnectionCheckRes> GetResultsAsync (Guid projectId, List requestBody)

Gets detailed results of the CBFEM analysis.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
requestBody List<int> List of connection IDs to calculate.

Return type

List<ConnectionCheckRes>

Example

Note: this example is autogenerated.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;

namespace Example
{
    public class GetResultsAsyncExample
    {
        public static async Task Main()
        {
            string ideaConFile = "testCon.ideaCon";
            
            string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
            
            using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
            {
                using (var conClient = await clientFactory.CreateApiClient())
                {

                    // Open the project and get its id
                    var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
                    Guid projectId = projData.ProjectId;
                    
                    // (Required) Select parameters
                    var requestBody = new List<int>(); // List<int> | List of connection IDs to calculate.

                    try
                    {
                        // Gets detailed results of the CBFEM analysis.
                        List<ConnectionCheckRes> result = await conClient.Calculation.GetResultsAsync(projectId, requestBody);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Calculation.GetResultsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Connection;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Gets the detailed results of the CBFEM analysis (checks of plates, bolts, welds etc.) for a given connection.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetResults(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/HSS_norm_cond.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
            List<int> connectionIds = new List<int> { connections[0].Id };

            //Run the CBFEM analysis first.
            await conClient.Calculation.CalculateAsync(conClient.ActiveProjectId, connectionIds);

            //Get the detailed results of the CBFEM analysis.
            List<ConnectionCheckRes> results = await conClient.Calculation.GetResultsAsync(conClient.ActiveProjectId, connectionIds);

            foreach (ConnectionCheckRes connectionResult in results)
            {
                Console.WriteLine($"Connection: {connectionResult.Name} (Id: {connectionResult.Id})");

                foreach (CheckResSummary summary in connectionResult.CheckResSummary)
                {
                    Console.WriteLine($"  Name: {summary.Name}, CheckValue: {summary.CheckValue}, CheckStatus: {summary.CheckStatus}");
                }

                Console.WriteLine($"  Plate checks: {connectionResult.CheckResPlate.Count}, Bolt checks: {connectionResult.CheckResBolt.Count}, Weld checks: {connectionResult.CheckResWeld.Count}");
            }

            //Close the opened project.
            await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
        }
    }
}

Looking for a code sample? request some help on our discussion page.

REST Usage

Http Request

All URIs are relative to http://localhost

POST /api/5/projects/{projectId}/connections/results

Using the GetResultsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Gets detailed results of the CBFEM analysis.
    ApiResponse<List<ConnectionCheckRes>> response = conClient.Calculation.GetResultsWithHttpInfo(projectId, requestBody);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling CalculationApi.GetResultsWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
404 Not Found -
422 Unprocessable Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]