LoadEffectApi
| Method | Description |
|---|---|
| AddLoadEffectAsync | Adds a new load effect to the connection. |
| CalculateLoadExtremesAsync | Calculates load extremes for the connection and keeps only the critical load effects active. |
| DeleteAllLoadEffectsAsync | Deletes every load effect in the specified connection, together with their internal forces. |
| DeleteLoadEffectAsync | Delete load effect loadEffectId. |
| GetLoadEffectAsync | Gets load impulses from the specified load effect. |
| GetLoadEffectsAsync | Gets all load effects defined in the specified connection. |
| GetLoadSettingsAsync | Get Load settings for connection in project. |
| SetLoadSettingsAsync | Set Load settings for connection in project. |
| UpdateLoadEffectAsync | Update load impulses in conLoading. |
AddLoadEffectAsync
ConLoadEffect AddLoadEffectAsync (Guid projectId, int connectionId, ConLoadEffect conLoadEffect = null)
Adds a new load effect to the connection.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| conLoadEffect | ConLoadEffect | The load effect data to add. | [optional] |
Return type
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 AddLoadEffectAsyncExample
{
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.
var conLoadEffect = new ConLoadEffect(); // ConLoadEffect | The load effect data to add. (optional)
try
{
// Adds a new load effect to the connection.
ConLoadEffect result = await conClient.LoadEffect.AddLoadEffectAsync(projectId, connectionId, conLoadEffect);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.AddLoadEffectAsync: " + 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>
/// This example adds a new load effect to an opened project.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task AddLoadEffect(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple cleat connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get Load Effects
List<ConLoadEffect> loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine("Add new Load effect.");
Console.WriteLine("Specify Name or Hit Enter for Quick Add");
string input = Console.ReadLine()?? "";
if (string.IsNullOrEmpty(input))
{
//Generic quick add of a load effect
//BUG: DOES NOT WORK.
//BUG: DEFAULT SHOULD BE ACTIVE.
var newLoadEffect = await conClient.LoadEffect.AddLoadEffectAsync(conClient.ActiveProjectId, connectionId);
if(newLoadEffect != null)
Console.WriteLine($"Load Effect Added: Name= {newLoadEffect.Name}, Id= {newLoadEffect.Id}");
}
{
ConLoadEffect loadEffect = new ConLoadEffect() { Name = input };
var newLoadEffect = await conClient.LoadEffect.AddLoadEffectAsync(conClient.ActiveProjectId, connectionId, loadEffect);
if (newLoadEffect != null)
Console.WriteLine($"Load Effect Added: Name= {newLoadEffect.Name}, Id= {newLoadEffect.Id}");
}
// Get Load Effects after add.
loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
string exampleFolder = GetExampleFolderPathOnDesktop("AddLoadEffect");
// Save updated file.
string fileName = "add-load-effects.ideaCon";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//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/{connectionId}/load-effects
Using the AddLoadEffectWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Adds a new load effect to the connection.
ApiResponse<ConLoadEffect> response = conClient.LoadEffect.AddLoadEffectWithHttpInfo(projectId, connectionId, conLoadEffect);
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 LoadEffectApi.AddLoadEffectWithHttpInfo: " + 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]
CalculateLoadExtremesAsync
List<ConLoadEffect> CalculateLoadExtremesAsync (Guid projectId, int connectionId)
Calculates load extremes for the connection and keeps only the critical load effects active.
Runs the load extremes (LEX) algorithm using the project's load extremes settings, then deactivates every load effect that does not produce any extreme. Use this to reduce the number of load effects calculated by Calculate on connections that contain many load effects. The returned list contains all load effects with their updated !:ConLoadEffect.Active flag.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. |
Return type
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 CalculateLoadExtremesAsyncExample
{
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.
try
{
// Calculates load extremes for the connection and keeps only the critical load effects active.
List<ConLoadEffect> result = await conClient.LoadEffect.CalculateLoadExtremesAsync(projectId, connectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.CalculateLoadExtremesAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
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}/load-effects/calculate-load-extremes
Using the CalculateLoadExtremesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Calculates load extremes for the connection and keeps only the critical load effects active.
ApiResponse<List<ConLoadEffect>> response = conClient.LoadEffect.CalculateLoadExtremesWithHttpInfo(projectId, connectionId);
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 LoadEffectApi.CalculateLoadExtremesWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAllLoadEffectsAsync
List<int> DeleteAllLoadEffectsAsync (Guid projectId, int connectionId)
Deletes every load effect in the specified connection, together with their internal forces.
Use this to replace a connection's whole loading in one request instead of one DELETE /load-effects/{loadEffectId} per load effect. Leaving the connection with no load effects is allowed, and calling this when there is nothing to delete succeeds with an empty list. The next POST /load-effects seeds the member/position slots again from the load effect it creates. Special-purpose load effects generated for the Max-capacity and Horizontal-tying checks are not deleted, because this API cannot re-create them. Delete one of those by its id if you really mean to.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. |
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 DeleteAllLoadEffectsAsyncExample
{
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.
try
{
// Deletes every load effect in the specified connection, together with their internal forces.
List<int> result = await conClient.LoadEffect.DeleteAllLoadEffectsAsync(projectId, connectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.DeleteAllLoadEffectsAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
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
DELETE /api/5/projects/{projectId}/connections/{connectionId}/load-effects
Using the DeleteAllLoadEffectsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Deletes every load effect in the specified connection, together with their internal forces.
ApiResponse<List<int>> response = conClient.LoadEffect.DeleteAllLoadEffectsWithHttpInfo(projectId, connectionId);
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 LoadEffectApi.DeleteAllLoadEffectsWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteLoadEffectAsync
int DeleteLoadEffectAsync (Guid projectId, int connectionId, int loadEffectId)
Delete load effect loadEffectId.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| loadEffectId | int | The ID of the load effect to delete. |
Return type
int
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 DeleteLoadEffectAsyncExample
{
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.
loadEffectId = 56; // int | The ID of the load effect to delete.
try
{
// Delete load effect loadEffectId.
int result = await conClient.LoadEffect.DeleteLoadEffectAsync(projectId, connectionId, loadEffectId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.DeleteLoadEffectAsync: " + 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>
/// Delete a load effect from a connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task DeleteLoadEffect(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get the load effects currently defined in the connection.
List<ConLoadEffect> loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine($"Load effects before delete: {loadEffects.Count}");
// Delete the last load effect in the list.
int loadEffectId = loadEffects.Last().Id;
int deletedId = await conClient.LoadEffect.DeleteLoadEffectAsync(conClient.ActiveProjectId, connectionId, loadEffectId);
Console.WriteLine($"Deleted load effect with Id = {deletedId}");
// Get the load effects after the delete.
loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine($"Load effects after delete: {loadEffects.Count}");
string exampleFolder = GetExampleFolderPathOnDesktop("DeleteLoadEffect");
// Save updated file.
string fileName = "deleted-load-effect.ideaCon";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//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
DELETE /api/5/projects/{projectId}/connections/{connectionId}/load-effects/{loadEffectId}
Using the DeleteLoadEffectWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete load effect loadEffectId.
ApiResponse<int> response = conClient.LoadEffect.DeleteLoadEffectWithHttpInfo(projectId, connectionId, loadEffectId);
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 LoadEffectApi.DeleteLoadEffectWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLoadEffectAsync
ConLoadEffect GetLoadEffectAsync (Guid projectId, int connectionId, int loadEffectId, bool? isPercentage = null)
Gets load impulses from the specified load effect.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| loadEffectId | int | The ID of the load effect to retrieve. | |
| isPercentage | bool? | Optional flag indicating whether to return percentage-based load effects. | [optional] |
Return type
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 GetLoadEffectAsyncExample
{
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.
loadEffectId = 56; // int | The ID of the load effect to retrieve.
isPercentage = true; // bool? | Optional flag indicating whether to return percentage-based load effects. (optional)
try
{
// Gets load impulses from the specified load effect.
ConLoadEffect result = await conClient.LoadEffect.GetLoadEffectAsync(projectId, connectionId, loadEffectId, isPercentage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.GetLoadEffectAsync: " + 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>
/// Get a single load effect of a connection and print its member loadings.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task GetLoadEffect(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get all load effects to find an existing load effect Id.
List<ConLoadEffect> loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
int loadEffectId = loadEffects[0].Id;
// Get a single load effect by its Id.
ConLoadEffect loadEffect = await conClient.LoadEffect.GetLoadEffectAsync(conClient.ActiveProjectId, connectionId, loadEffectId);
Console.WriteLine($"Load effect: Id= {loadEffect.Id}, Name= {loadEffect.Name}, IsPercentage= {loadEffect.IsPercentage}");
// Print the internal forces applied to each member.
// Note: continuous members have two entries (Begin and End), ended members have one.
foreach (ConLoadEffectMemberLoad loading in loadEffect.MemberLoadings)
{
var f = loading.SectionLoad;
Console.WriteLine($"Member {loading.MemberId} ({loading.Position}): N= {f.N}, Vy= {f.Vy}, Vz= {f.Vz}, Mx= {f.Mx}, My= {f.My}, Mz= {f.Mz}");
}
//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
GET /api/5/projects/{projectId}/connections/{connectionId}/load-effects/{loadEffectId}
Using the GetLoadEffectWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets load impulses from the specified load effect.
ApiResponse<ConLoadEffect> response = conClient.LoadEffect.GetLoadEffectWithHttpInfo(projectId, connectionId, loadEffectId, isPercentage);
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 LoadEffectApi.GetLoadEffectWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLoadEffectsAsync
List<ConLoadEffect> GetLoadEffectsAsync (Guid projectId, int connectionId, bool? isPercentage = null)
Gets all load effects defined in the specified connection.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| isPercentage | bool? | Optional flag indicating whether to return percentage-based load effects. | [optional] |
Return type
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 GetLoadEffectsAsyncExample
{
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.
isPercentage = true; // bool? | Optional flag indicating whether to return percentage-based load effects. (optional)
try
{
// Gets all load effects defined in the specified connection.
List<ConLoadEffect> result = await conClient.LoadEffect.GetLoadEffectsAsync(projectId, connectionId, isPercentage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.GetLoadEffectsAsync: " + 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>
/// Get all load effects defined in a connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task GetLoadEffects(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple cleat connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get all load effects defined in the connection.
List<ConLoadEffect> loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine($"Connection {connectionId} contains {loadEffects.Count} load effect(s).");
foreach (ConLoadEffect loadEffect in loadEffects)
{
Console.WriteLine($"Id= {loadEffect.Id}, Name= {loadEffect.Name}, Active= {loadEffect.Active}, MemberLoadings= {loadEffect.MemberLoadings.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
GET /api/5/projects/{projectId}/connections/{connectionId}/load-effects
Using the GetLoadEffectsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets all load effects defined in the specified connection.
ApiResponse<List<ConLoadEffect>> response = conClient.LoadEffect.GetLoadEffectsWithHttpInfo(projectId, connectionId, isPercentage);
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 LoadEffectApi.GetLoadEffectsWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetLoadSettingsAsync
ConLoadSettings GetLoadSettingsAsync (Guid projectId, int connectionId)
Get Load settings for connection in project.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. |
Return type
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 GetLoadSettingsAsyncExample
{
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.
try
{
// Get Load settings for connection in project.
ConLoadSettings result = await conClient.LoadEffect.GetLoadSettingsAsync(projectId, connectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.GetLoadSettingsAsync: " + 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.Connection;
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// Get the load settings of a connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task GetLoadSettings(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get the load settings for the connection.
ConLoadSettings loadSettings = await conClient.LoadEffect.GetLoadSettingsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine($"Load settings of connection {connectionId}:");
Console.WriteLine($"LoadsInEquilibrium= {loadSettings.LoadsInEquilibrium}");
Console.WriteLine($"LoadsInPercentage= {loadSettings.LoadsInPercentage}");
//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
GET /api/5/projects/{projectId}/connections/{connectionId}/load-effects/get-load-settings
Using the GetLoadSettingsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get Load settings for connection in project.
ApiResponse<ConLoadSettings> response = conClient.LoadEffect.GetLoadSettingsWithHttpInfo(projectId, connectionId);
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 LoadEffectApi.GetLoadSettingsWithHttpInfo: " + 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 | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SetLoadSettingsAsync
ConLoadSettings SetLoadSettingsAsync (Guid projectId, int connectionId, ConLoadSettings conLoadSettings = null)
Set Load settings for connection in project.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| conLoadSettings | ConLoadSettings | The new load settings to apply. | [optional] |
Return type
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 SetLoadSettingsAsyncExample
{
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.
var conLoadSettings = new ConLoadSettings(); // ConLoadSettings | The new load settings to apply. (optional)
try
{
// Set Load settings for connection in project.
ConLoadSettings result = await conClient.LoadEffect.SetLoadSettingsAsync(projectId, connectionId, conLoadSettings);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.SetLoadSettingsAsync: " + 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.Connection;
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// Set the load settings of a connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task SetLoadSettings(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
// Get the current load settings for the connection.
ConLoadSettings loadSettings = await conClient.LoadEffect.GetLoadSettingsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine($"Current settings: LoadsInEquilibrium= {loadSettings.LoadsInEquilibrium}, LoadsInPercentage= {loadSettings.LoadsInPercentage}");
// Toggle the loads in equilibrium setting and set it back to the connection.
loadSettings.LoadsInEquilibrium = !loadSettings.LoadsInEquilibrium;
ConLoadSettings updatedSettings = await conClient.LoadEffect.SetLoadSettingsAsync(conClient.ActiveProjectId, connectionId, loadSettings);
Console.WriteLine($"Updated settings: LoadsInEquilibrium= {updatedSettings.LoadsInEquilibrium}, LoadsInPercentage= {updatedSettings.LoadsInPercentage}");
string exampleFolder = GetExampleFolderPathOnDesktop("SetLoadSettings");
// Save updated file.
string fileName = "updated-load-settings.ideaCon";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//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/{connectionId}/load-effects/set-load-settings
Using the SetLoadSettingsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Set Load settings for connection in project.
ApiResponse<ConLoadSettings> response = conClient.LoadEffect.SetLoadSettingsWithHttpInfo(projectId, connectionId, conLoadSettings);
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 LoadEffectApi.SetLoadSettingsWithHttpInfo: " + 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]
UpdateLoadEffectAsync
ConLoadEffect UpdateLoadEffectAsync (Guid projectId, int connectionId, ConLoadEffect conLoadEffect = null)
Update load impulses in conLoading.
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection. | |
| conLoadEffect | ConLoadEffect | The load effect data to update. | [optional] |
Return type
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 UpdateLoadEffectAsyncExample
{
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.
var conLoadEffect = new ConLoadEffect(); // ConLoadEffect | The load effect data to update. (optional)
try
{
// Update load impulses in conLoading.
ConLoadEffect result = await conClient.LoadEffect.UpdateLoadEffectAsync(projectId, connectionId, conLoadEffect);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling LoadEffect.UpdateLoadEffectAsync: " + 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.Api.Connection.Model.Connection;
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// Update existing load effects in a connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task UpdateLoadEffect(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
ConLoadSettings loadSettings = await conClient.LoadEffect.GetLoadSettingsAsync(conClient.ActiveProjectId, connectionId);
Console.WriteLine(loadSettings.ToString());
// Get Load Effects
List<ConLoadEffect> loadEffects = await conClient.LoadEffect.GetLoadEffectsAsync(conClient.ActiveProjectId, connectionId);
double effectMultiplier = 1.25;
ConLoadEffect loadEffectBasis = null;
for (int i = 0; i < loadEffects.Count; i++)
{
if (i == 0)
{
loadEffectBasis = loadEffects[i];
continue;
}
ConLoadEffect loadEffect = loadEffects[i];
var memberLoadings = loadEffect.MemberLoadings.ToList();
// NOTE: LoadEffect provides all the member loadings - even if LoadsInEquilibrium is set to False.
for (int j = 0; j < memberLoadings.Count; j++)
{
ConLoadEffectMemberLoad loading = memberLoadings[j];
ConLoadEffectMemberLoad loadingBasis = memberLoadings[j];
loading.SectionLoad.N = loadingBasis.SectionLoad.N * effectMultiplier;
loading.SectionLoad.Vy = loadingBasis.SectionLoad.Vy * effectMultiplier;
loading.SectionLoad.Vz = loadingBasis.SectionLoad.Vz * effectMultiplier;
loading.SectionLoad.Mz = loadingBasis.SectionLoad.Mz * effectMultiplier;
loading.SectionLoad.My = loadingBasis.SectionLoad.My * effectMultiplier;
loading.SectionLoad.Mx = loadingBasis.SectionLoad.Mx * effectMultiplier;
}
await conClient.LoadEffect.UpdateLoadEffectAsync(conClient.ActiveProjectId, connectionId, loadEffect);
// Increase each increment by 25% of the original value.
effectMultiplier += 0.25;
}
string exampleFolder = GetExampleFolderPathOnDesktop("ApplyTemplate");
// Save updated file.
string fileName = "updated-load-effects.ideaCon";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//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
PUT /api/5/projects/{projectId}/connections/{connectionId}/load-effects
Using the UpdateLoadEffectWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update load impulses in conLoading.
ApiResponse<ConLoadEffect> response = conClient.LoadEffect.UpdateLoadEffectWithHttpInfo(projectId, connectionId, conLoadEffect);
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 LoadEffectApi.UpdateLoadEffectWithHttpInfo: " + 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]