CrossSectionApi
| Method | Description |
|---|---|
| AddReinforcedCrossSection | Add a new reinforced cross-section to the project from embedded geometry |
| GetReinforcedCrossSectionData | Get reinforced cross-section with full geometry (IOM format) |
| ImportReinforcedCrossSection | Import reinforced cross-section from template |
| ReinforcedCrossSections | Get reinforced cross sections |
AddReinforcedCrossSection
RcsReinforcedCrossSection AddReinforcedCrossSection (Guid projectId, ReinforcedCrossSectionData reinforcedCrossSectionData = null)
Add a new reinforced cross-section to the project from embedded geometry
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | Project ID | |
| reinforcedCrossSectionData | ReinforcedCrossSectionData | Reinforced cross-section with embedded geometry. Materials can be referenced by name (must exist in project) or by ID. | [optional] |
Return type
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.RcsApi.Api;
using IdeaStatiCa.RcsApi.Client;
using IdeaStatiCa.RcsApi.Model;
namespace Example
{
public class AddReinforcedCrossSectionExample
{
public static void Main()
{
// Create the client which is connected to the service.
ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
using (var conClient = await clientFactory.CreateConnectionApiClient())
{
var reinforcedCrossSectionData = new ReinforcedCrossSectionData(); // ReinforcedCrossSectionData | Reinforced cross-section with embedded geometry. Materials can be referenced by name (must exist in project) or by ID. (optional)
try
{
// Add a new reinforced cross-section to the project from embedded geometry
RcsReinforcedCrossSection result = conClient.CrossSection.AddReinforcedCrossSection(projectId, reinforcedCrossSectionData);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CrossSection.AddReinforcedCrossSection: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
}
}
}
}
}
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/1/projects/{projectId}/cross-sections/reinforced-cross-sections
Using the AddReinforcedCrossSectionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Add a new reinforced cross-section to the project from embedded geometry
ApiResponse<RcsReinforcedCrossSection> response = conClient.CrossSection.AddReinforcedCrossSectionWithHttpInfo(projectId, reinforcedCrossSectionData);
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 CrossSectionApi.AddReinforcedCrossSectionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Authorization
No authorization required
HTTP request headers
- Content-Type: application/xml, text/xml, application/+xml, application/json-patch+json, application/json, text/json, application/+json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetReinforcedCrossSectionData
ReinforcedCrossSection GetReinforcedCrossSectionData (Guid projectId, int reinforcedCssSectionId)
Get reinforced cross-section with full geometry (IOM format)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | Project ID | |
| reinforcedCssSectionId | int | Reinforced cross-section ID |
Return type
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.RcsApi.Api;
using IdeaStatiCa.RcsApi.Client;
using IdeaStatiCa.RcsApi.Model;
namespace Example
{
public class GetReinforcedCrossSectionDataExample
{
public static void Main()
{
// Create the client which is connected to the service.
ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
using (var conClient = await clientFactory.CreateConnectionApiClient())
{
reinforcedCssSectionId = 56; // int | Reinforced cross-section ID
try
{
// Get reinforced cross-section with full geometry (IOM format)
ReinforcedCrossSection result = conClient.CrossSection.GetReinforcedCrossSectionData(projectId, reinforcedCssSectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CrossSection.GetReinforcedCrossSectionData: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
}
}
}
}
}
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
GET /api/1/projects/{projectId}/cross-sections/reinforced-cross-sections/{reinforcedCssSectionId}
Using the GetReinforcedCrossSectionDataWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get reinforced cross-section with full geometry (IOM format)
ApiResponse<ReinforcedCrossSection> response = conClient.CrossSection.GetReinforcedCrossSectionDataWithHttpInfo(projectId, reinforcedCssSectionId);
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 CrossSectionApi.GetReinforcedCrossSectionDataWithHttpInfo: " + 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ImportReinforcedCrossSection
RcsReinforcedCrossSection ImportReinforcedCrossSection (Guid projectId, RcsReinforcedCrossSectionImportData rcsReinforcedCrossSectionImportData = null)
Import reinforced cross-section from template
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | Project ID | |
| rcsReinforcedCrossSectionImportData | RcsReinforcedCrossSectionImportData | Import data containing settings and template | [optional] |
Return type
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.RcsApi.Api;
using IdeaStatiCa.RcsApi.Client;
using IdeaStatiCa.RcsApi.Model;
namespace Example
{
public class ImportReinforcedCrossSectionExample
{
public static void Main()
{
// Create the client which is connected to the service.
ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
using (var conClient = await clientFactory.CreateConnectionApiClient())
{
var rcsReinforcedCrossSectionImportData = new RcsReinforcedCrossSectionImportData(); // RcsReinforcedCrossSectionImportData | Import data containing settings and template (optional)
try
{
// Import reinforced cross-section from template
RcsReinforcedCrossSection result = conClient.CrossSection.ImportReinforcedCrossSection(projectId, rcsReinforcedCrossSectionImportData);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CrossSection.ImportReinforcedCrossSection: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
}
}
}
}
}
Code Samples
using IdeaStatiCa.Api.RCS.Model;
using IdeaStatiCa.RcsApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// Calculates all avaliable sections in an existing RCS project.
/// </summary>
/// <param name="rcsClient">The connected RCS API Client</param>
public static async Task ImportReinforcedCrossSection(IRcsApiClient rcsClient)
{
string filePath = "Inputs/Project1.IdeaRcs";
RcsProject rcsProject = await rcsClient.Project.OpenProjectAsync(filePath);
//Get the list of avaliable reinforced cross-sections in the project
List<RcsReinforcedCrossSection> reinforcedCrossSections = await rcsClient.CrossSection.ReinforcedCrossSectionsAsync(rcsClient.Project.ProjectId);
//Print avaliable Reinforced Cross Sections in the project
foreach (var css in reinforcedCrossSections)
{
Console.WriteLine($"Id={css.Id} Name={css.Name}");
}
//Define the import settings. Set an Id or Provide 0
RcsReinforcedCrosssSectionImportSetting importSetting = new RcsReinforcedCrosssSectionImportSetting
{
//Provide Id of new Refinforced Cross-section
ReinforcedCrossSectionId = 10,
PartsToImport = "Complete"
};
//Reference to .Nav file with the Cross-section defined.
string navFilePath = "Inputs/rect-L-4-2.nav";
string templateXML = "";
using (var sr = new StreamReader(navFilePath))
{
// Read the stream as a string, and write the string to the console.
templateXML = await sr.ReadToEndAsync();
}
RcsReinforcedCrossSectionImportData importData = new RcsReinforcedCrossSectionImportData()
{
Setting = importSetting,
Template = templateXML
};
//Reinforced Cross-section is updated and returned
RcsReinforcedCrossSection newReinforcedCrossSection = await rcsClient.CrossSection.ImportReinforcedCrossSectionAsync(rcsClient.Project.ProjectId, importData);
//Get the list of avaliable reinforced cross-sections in the project
List<RcsReinforcedCrossSection> reinforcedCrossSectionsUpdated = await rcsClient.CrossSection.ReinforcedCrossSectionsAsync(rcsClient.Project.ProjectId);
//Print avaliable Reinforced Cross Sections in the project
foreach (var css in reinforcedCrossSectionsUpdated)
{
Console.WriteLine($"Id={css.Id} Name={css.Name}");
}
//We will now want to assign the new reinforced cross-section to a Section.
//Get the list of avaliable sections in the project
List<RcsSection> sections = await rcsClient.Section.SectionsAsync(rcsClient.Project.ProjectId);
//Print avaliable Reinforced Cross Sections in the project
foreach (var section in sections)
{
Console.WriteLine($"Id={section.Id} Name={section.Name}");
}
//Find the section inwhich we want to update. In this case there is a Section with the Name 'SectionA'
RcsSection sectionToUpdate = sections.Where(x => x.Name == "S 1").First();
//Find the reinforced cross-section which we want to set to the section.
sectionToUpdate.RCSId = newReinforcedCrossSection.Id;
//Section is updated and returned
RcsSection updatedSection = await rcsClient.Section.UpdateSectionAsync(rcsClient.Project.ProjectId, sectionToUpdate);
//Get a folder on Desktop for the Example
string exampleFolder = GetExampleFolderPathOnDesktop("Add Reinforced Cross Section");
// Save updated file.
string fileName = "Project1_wAddedCss.ideaCon";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await rcsClient.Project.SaveProjectAsync(rcsClient.Project.ProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//close the project
await rcsClient.Project.CloseProjectAsync(rcsClient.Project.ProjectId);
}
/// <summary>
/// Calculates all avaliable sections in an existing RCS project.
/// </summary>
/// <param name="rcsClient">The connected RCS API Client</param>
public static async Task UpdateReinforcedCrossSectionReoLayout(IRcsApiClient rcsClient)
{
string filePath = "Inputs/Project1.IdeaRcs";
RcsProject rcsProject = await rcsClient.Project.OpenProjectAsync(filePath);
//Get the list of avaliable reinforced cross-sections in the project
List<RcsReinforcedCrossSection> reinforcedCrossSections = await rcsClient.CrossSection.ReinforcedCrossSectionsAsync(rcsClient.Project.ProjectId);
//Print avaliable Reinforced Cross Sections in the project
foreach (var css in reinforcedCrossSections)
{
Console.WriteLine($"Id={css.Id} Name={css.Name}");
}
RcsReinforcedCrossSection crossSectionToUpdate = reinforcedCrossSections[0];
//Define the import settings. Set an Id or Provide 0
RcsReinforcedCrosssSectionImportSetting importSetting = new RcsReinforcedCrosssSectionImportSetting
{
//Provide Id of new Refinforced Cross-section
ReinforcedCrossSectionId = crossSectionToUpdate.CrossSectionId,
//We can choose between 'Reinf', 'Css' or 'Tendon' or 'Complete'
PartsToImport = "Reinf"
};
//Reference to .Nav file with the Cross-section defined.
string navFilePath = "Inputs/rect-L-4-2.nav";
string templateXML = "";
using (var sr = new StreamReader(navFilePath))
{
// Read the stream as a string, and write the string to the console.
templateXML = await sr.ReadToEndAsync();
}
RcsReinforcedCrossSectionImportData importData = new RcsReinforcedCrossSectionImportData()
{
Setting = importSetting,
Template = templateXML
};
//Reinforced Cross-section is updated and returned
RcsReinforcedCrossSection newReinforcedCrossSection = await rcsClient.CrossSection.ImportReinforcedCrossSectionAsync(rcsClient.Project.ProjectId, importData);
//Get a folder on Desktop for the Example
string exampleFolder = GetExampleFolderPathOnDesktop("Update Reinforced Cross Section Layout");
// Save updated file.
string fileName = "Project1_UpdateLayout.ideaRcs";
string saveFilePath = Path.Combine(exampleFolder, fileName);
await rcsClient.Project.SaveProjectAsync(rcsClient.Project.ProjectId, saveFilePath);
Console.WriteLine("File saved to: " + saveFilePath);
//close the project
await rcsClient.Project.CloseProjectAsync(rcsClient.Project.ProjectId);
}
}
}
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/1/projects/{projectId}/cross-sections/import-reinforced-cross-section
Using the ImportReinforcedCrossSectionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Import reinforced cross-section from template
ApiResponse<RcsReinforcedCrossSection> response = conClient.CrossSection.ImportReinforcedCrossSectionWithHttpInfo(projectId, rcsReinforcedCrossSectionImportData);
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 CrossSectionApi.ImportReinforcedCrossSectionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Authorization
No authorization required
HTTP request headers
- Content-Type: application/xml, text/xml, application/+xml, application/json-patch+json, application/json, text/json, application/+json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ReinforcedCrossSections
List<RcsReinforcedCrossSection> ReinforcedCrossSections (Guid projectId)
Get reinforced cross sections
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | Project ID |
Return type
List<RcsReinforcedCrossSection>
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.RcsApi.Api;
using IdeaStatiCa.RcsApi.Client;
using IdeaStatiCa.RcsApi.Model;
namespace Example
{
public class ReinforcedCrossSectionsExample
{
public static void Main()
{
// Create the client which is connected to the service.
ConnectionApiClientFactory clientFactory = new ConnectionApiClientFactory("http://localhost:5000");
using (var conClient = await clientFactory.CreateConnectionApiClient())
{
try
{
// Get reinforced cross sections
List<RcsReinforcedCrossSection> result = conClient.CrossSection.ReinforcedCrossSections(projectId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling CrossSection.ReinforcedCrossSections: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
}
}
}
}
}
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
GET /api/1/projects/{projectId}/cross-sections/reinforced-cross-sections
Using the ReinforcedCrossSectionsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get reinforced cross sections
ApiResponse<List<RcsReinforcedCrossSection>> response = conClient.CrossSection.ReinforcedCrossSectionsWithHttpInfo(projectId);
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 CrossSectionApi.ReinforcedCrossSectionsWithHttpInfo: " + 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]