Table of Contents

MaterialApi

Method Description
AddBoltAssemblyAsync Add bolt assembly to the project. Accepted names come from `GET .../materials/bolt-assemblies/library`.
AddCrossSectionAsync Adds a library cross-section (by its MPRL name and material) to the project.
AddMaterialBoltGradeAsync Adds a material to the project.
AddMaterialConcreteAsync Adds a material to the project.
AddMaterialHeadedStudGradeAsync Adds a material to the project.
AddMaterialReinforcementAsync Adds a material to the project.
AddMaterialSteelAsync Adds a material to the project.
AddMaterialWeldAsync Adds a material to the project.
AddParametricCrossSectionAsync Creates a parametric cross-section (welded, boxed, cold-formed, parametric rolled) from its shape type and dimensions. Dimension ids are the stable parameter ids the section GET exposes; dimensions not named keep the shape's defaults.
AddPinAsync Add pin to the project. Pins are available only for the ECEN design code; list the accepted names via `GET .../materials/pin/library`.
GetAllMaterialsAsync Gets materials used in the specified project.
GetBoltAssembliesAsync Gets bolt assemblies used in the specified project.
GetBoltGradeMaterialsAsync Gets materials used in the specified project.
GetConcreteMaterialsAsync Gets materials used in the specified project.
GetCrossSectionAsync Gets one cross-section of the project: the same object the listing returns for it.
GetCrossSectionGeometryAsync Gets the evaluated outline geometry of one cross-section: per component the closed outline and the openings as ordered chains of line/arc segments, with the material the component is made of.
GetCrossSectionsAsync Gets the cross-sections of the project: id, display name and the definition of each (library / parametric / custom). The evaluated outline of a section is served by `cross-sections/{cssId}/geometry`.
GetHeadedStudGradeMaterialsAsync Gets materials used in the specified project.
GetMaterialLibraryAsync Lists the MPRL names available in the material library for the project's design code.
GetParametricCrossSectionShapeTemplateAsync The fill-in template of a parametric shape: every dimension with its stable id, its stable code name (e.g. "wH") and the shape's default value, in SI units. Change the values you care about, set the material, and POST it to `cross-sections/parametric`.
GetParametricCrossSectionShapesAsync Lists the shape types the parametric cross-section endpoints accept (e.g. "Iw", "Tw", "CHSPar"). Get a shape's fill-in template from `cross-sections/parametric/shapes/{shapeType}`.
GetPinsAsync Gets pins used in the specified project.
GetReinforcementMaterialsAsync Gets materials used in the specified project.
GetSteelMaterialsAsync Gets materials used in the specified project.
GetWeldingMaterialsAsync Gets materials used in the specified project.
UpdateParametricCrossSectionAsync Replaces the definition of parametric cross-section cssId with the given one — a full replacement: dimensions not named revert to the shape's defaults, so send the complete definition obtained from the section GET. Answers 409 when the id stores a library or general section.

AddBoltAssemblyAsync

Object AddBoltAssemblyAsync (Guid projectId, ConMprlElement conMprlElement = null)

Add bolt assembly to the project. Accepted names come from GET .../materials/bolt-assemblies/library.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of a new bolt assemby to be added to the project. [optional]

Return type

Object

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 AddBoltAssemblyAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of a new bolt assemby to be added to the project. (optional) 

                    try
                    {
                        // Add bolt assembly to the project. Accepted names come from  `GET .../materials/bolt-assemblies/library`.
                        Object result = await conClient.Material.AddBoltAssemblyAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddBoltAssemblyAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get the list of avaliable Bolt Assemblies in a project and Add one to the project. 
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetAndAddBoltAssemblies(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Create a map of Name and Id. Used if Prefer to use Name.
            Dictionary<string, int> BoltGradesMap = new Dictionary<string, int>();
            Dictionary<string, int> BoltAssembliesMap = new Dictionary<string, int>();

            //TODO Upgrade to new IOM Bolt Grade Definitions.
            await conClient.Material.GetBoltGradeMaterialsAsync(conClient.ActiveProjectId);

            //GET AND ADD NEW BOLT ASSEMBLIES
            List<BoltAssembly> boltAssemblies = (await conClient.Material.GetBoltAssembliesAsync(conClient.ActiveProjectId)).Cast<BoltAssembly>().ToList();
            boltAssemblies.ForEach(x => BoltAssembliesMap.Add(x.Name, x.Id));

            //List of new bolt Assemblies to Add.
            List<string> boltAssembliesToAdd = new List<string>() { "M16 8.8", "M20 8.8", "M24 8.8" };

            foreach (var assembly in boltAssembliesToAdd)
            {
                //Only Add Assemblies which are not in the model currently.
                if (!BoltAssembliesMap.ContainsKey(assembly))
                {
                    //FIX: This should Output the created Bolt Assembly Object. We need the ID.
                    await conClient.Material.AddBoltAssemblyAsync(conClient.ActiveProjectId, new ConMprlElement() { MprlName = assembly});
                    
                    //Console.WriteLine("Successfully Added new Bolt Assembly: " + added.MprlName);

                    //Need to check what happens if name is not found...
                }
                else
                    Console.WriteLine("Assembly already in project:" + assembly);
            }

            string exampleFolder = GetExampleFolderPathOnDesktop("GetAndAddMaterials");
            string fileName = "simple cleat connection-added materials.ideaCon";
            string saveFilePath = Path.Combine(exampleFolder, fileName);

            //Save the applied template
            await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
            Console.WriteLine("Project 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}/materials/bolt-assemblies

Using the AddBoltAssemblyWithHttpInfo variant

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

try
{
    // Add bolt assembly to the project. Accepted names come from  `GET .../materials/bolt-assemblies/library`.
    ApiResponse<Object> response = conClient.Material.AddBoltAssemblyWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddBoltAssemblyWithHttpInfo: " + 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]

AddCrossSectionAsync

ConCrossSection AddCrossSectionAsync (Guid projectId, ConMprlCrossSection conMprlCrossSection = null)

Adds a library cross-section (by its MPRL name and material) to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlCrossSection ConMprlCrossSection MPRL name and material of the new cross-section. [optional]

Return type

ConCrossSection

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 AddCrossSectionAsyncExample
    {
        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 conMprlCrossSection = new ConMprlCrossSection(); // ConMprlCrossSection | MPRL name and material of the new cross-section. (optional) 

                    try
                    {
                        // Adds a library cross-section (by its MPRL name and material) to the project.
                        ConCrossSection result = await conClient.Material.AddCrossSectionAsync(projectId, conMprlCrossSection);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddCrossSectionAsync: " + 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.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get the list of avaliable Cross-sections in a project and Add some to the project. 
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetAndAddCrossSections(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);


            Dictionary<string, int> CrossSectionMap = new Dictionary<string, int>();
            Dictionary<string, int> SteelMaterialMap = new Dictionary<string, int>();

            List<IdeaRS.OpenModel.Material.MatSteel> steelMaterials = (await conClient.Material.GetSteelMaterialsAsync(conClient.ActiveProjectId)).Cast<IdeaRS.OpenModel.Material.MatSteel>().ToList();
            steelMaterials.ForEach(x => SteelMaterialMap.Add(x.Name, x.Id));

            List<ConCrossSection> crossSections = await conClient.Material.GetCrossSectionsAsync(conClient.ActiveProjectId);
            crossSections.ForEach(x => CrossSectionMap.Add(x.Name, x.Id));

            //List of new Cross-Sections to Add.
            List<ConMprlCrossSection> crossSectionToAdd = new List<ConMprlCrossSection>() 
            { 
                new ConMprlCrossSection() {MaterialName = "S 355", MprlName = "IPE240" },
                new ConMprlCrossSection() {MaterialName = "S 275", MprlName = "IPE300" },
                new ConMprlCrossSection() {MaterialName = "\"S 355", MprlName = "IPE450" }
            };

            foreach (var section in crossSectionToAdd)
            {
                if (!SteelMaterialMap.ContainsKey(section.MaterialName))
                {
                    //FIX: Add Materal should return the Material not the ConMprlElement
                    await conClient.Material.AddMaterialSteelAsync(conClient.ActiveProjectId, new ConMprlElement() { MprlName = section.MaterialName });
                    //Console.WriteLine("Successfully Added new Material: " + addedMaterial.MprlName);
                }
                else
                    Console.WriteLine("Material already in project:" + section.MaterialName);

                //Only Add Assemblies which are not in the model currently.
                if (!CrossSectionMap.ContainsKey(section.MprlName))
                {
                    //FIX: This should Output the created Bolt Assembly Object. We need the ID.
                    await conClient.Material.AddCrossSectionAsync(conClient.ActiveProjectId, new ConMprlCrossSection() { MaterialName = "S 355", MprlName = section.MprlName });
                    //Console.WriteLine("Successfully Added new Cross-section: " + added.MprlName);

                    //Need to check what happens if name is not found...
                }
                else
                    Console.WriteLine("cross-section already in project:" + section);
            }

            string exampleFolder = GetExampleFolderPathOnDesktop("GetAndAddCrossSections");
            string fileName = "simple cleat connection-addedSection.ideaCon";
            string saveFilePath = Path.Combine(exampleFolder, fileName);

            //Save the applied template
            await conClient.Project.SaveProjectAsync(conClient.ActiveProjectId, saveFilePath);
            Console.WriteLine("Project 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}/materials/cross-sections

Using the AddCrossSectionWithHttpInfo variant

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

try
{
    // Adds a library cross-section (by its MPRL name and material) to the project.
    ApiResponse<ConCrossSection> response = conClient.Material.AddCrossSectionWithHttpInfo(projectId, conMprlCrossSection);
    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 MaterialApi.AddCrossSectionWithHttpInfo: " + 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]

AddMaterialBoltGradeAsync

Object AddMaterialBoltGradeAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialBoltGradeAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialBoltGradeAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialBoltGradeAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Add a new bolt grade material from the MPRL (Material and Product Range Library) to the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task AddMaterialBoltGrade(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Define the new bolt grade by its name in the MPRL.
            ConMprlElement newBoltGrade = new ConMprlElement() { MprlName = "10.9" };

            //Add the bolt grade material to the project.
            await conClient.Material.AddMaterialBoltGradeAsync(conClient.ActiveProjectId, newBoltGrade);
            Console.WriteLine("Bolt grade added to the project: " + newBoltGrade.MprlName);

            //Verify by listing the bolt grade materials which are now available in the project.
            List<MaterialBoltGrade> boltGrades = (await conClient.Material.GetBoltGradeMaterialsAsync(conClient.ActiveProjectId)).Cast<MaterialBoltGrade>().ToList();

            Console.WriteLine("Bolt grades in the project: " + boltGrades.Count);
            foreach (MaterialBoltGrade boltGrade in boltGrades)
            {
                Console.WriteLine($"Id: {boltGrade.Id} Name: {boltGrade.Name}");
            }

            //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}/materials/bolt-grade

Using the AddMaterialBoltGradeWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialBoltGradeWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialBoltGradeWithHttpInfo: " + 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]

AddMaterialConcreteAsync

Object AddMaterialConcreteAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialConcreteAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialConcreteAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialConcreteAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Add a new concrete material from the MPRL (Material and Product Range Library) to the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task AddMaterialConcrete(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Define the new concrete material by its name in the MPRL.
            ConMprlElement newConcrete = new ConMprlElement() { MprlName = "C70/85" };

            //Add the concrete material to the project (used by concrete blocks of anchoring operations).
            await conClient.Material.AddMaterialConcreteAsync(conClient.ActiveProjectId, newConcrete);
            Console.WriteLine("Concrete material added to the project: " + newConcrete.MprlName);

            //Verify by listing the concrete materials which are now available in the project.
            List<MatConcrete> concreteMaterials = (await conClient.Material.GetConcreteMaterialsAsync(conClient.ActiveProjectId)).Cast<MatConcrete>().ToList();

            Console.WriteLine("Concrete materials in the project: " + concreteMaterials.Count);
            foreach (MatConcrete concrete in concreteMaterials)
            {
                Console.WriteLine($"Id: {concrete.Id} Name: {concrete.Name}");
            }

            //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}/materials/concrete

Using the AddMaterialConcreteWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialConcreteWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialConcreteWithHttpInfo: " + 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]

AddMaterialHeadedStudGradeAsync

Object AddMaterialHeadedStudGradeAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialHeadedStudGradeAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialHeadedStudGradeAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialHeadedStudGradeAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Add a new headed stud grade material from the MPRL (Material and Product Range Library) to the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task AddMaterialHeadedStudGrade(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Define the new headed stud grade by its name in the MPRL.
            ConMprlElement newHeadedStudGrade = new ConMprlElement() { MprlName = "SD1" };

            //Add the headed stud grade material to the project.
            await conClient.Material.AddMaterialHeadedStudGradeAsync(conClient.ActiveProjectId, newHeadedStudGrade);
            Console.WriteLine("Headed stud grade added to the project: " + newHeadedStudGrade.MprlName);

            //Verify by listing the headed stud grade materials which are now available in the project.
            List<MaterialHeadedStudGrade> headedStudGrades = (await conClient.Material.GetHeadedStudGradeMaterialsAsync(conClient.ActiveProjectId)).Cast<MaterialHeadedStudGrade>().ToList();

            Console.WriteLine("Headed stud grades in the project: " + headedStudGrades.Count);
            foreach (MaterialHeadedStudGrade headedStudGrade in headedStudGrades)
            {
                Console.WriteLine($"Id: {headedStudGrade.Id} Name: {headedStudGrade.Name}");
            }

            //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}/materials/headed-stud-grade

Using the AddMaterialHeadedStudGradeWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialHeadedStudGradeWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialHeadedStudGradeWithHttpInfo: " + 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]

AddMaterialReinforcementAsync

Object AddMaterialReinforcementAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialReinforcementAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialReinforcementAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialReinforcementAsync: " + 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}/materials/reinforcement

Using the AddMaterialReinforcementWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialReinforcementWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialReinforcementWithHttpInfo: " + 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]

AddMaterialSteelAsync

Object AddMaterialSteelAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialSteelAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialSteelAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialSteelAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Add a new steel material from the MPRL (Material and Product Range Library) to the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task AddMaterialSteel(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Define the new steel material by its name in the MPRL.
            ConMprlElement newSteel = new ConMprlElement() { MprlName = "S 450" };

            //Add the steel material to the project. It can then be assigned to plates, members or welds.
            await conClient.Material.AddMaterialSteelAsync(conClient.ActiveProjectId, newSteel);
            Console.WriteLine("Steel material added to the project: " + newSteel.MprlName);

            //Verify by listing the steel materials which are now available in the project.
            List<MatSteel> steelMaterials = (await conClient.Material.GetSteelMaterialsAsync(conClient.ActiveProjectId)).Cast<MatSteel>().ToList();

            Console.WriteLine("Steel materials in the project: " + steelMaterials.Count);
            foreach (MatSteel steel in steelMaterials)
            {
                Console.WriteLine($"Id: {steel.Id} Name: {steel.Name}");
            }

            //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}/materials/steel

Using the AddMaterialSteelWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialSteelWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialSteelWithHttpInfo: " + 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]

AddMaterialWeldAsync

Object AddMaterialWeldAsync (Guid projectId, ConMprlElement conMprlElement = null)

Adds a material to the project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of the new material to be added to the project. [optional]

Return type

Object

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 AddMaterialWeldAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of the new material to be added to the project. (optional) 

                    try
                    {
                        // Adds a material to the project.
                        Object result = await conClient.Material.AddMaterialWeldAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddMaterialWeldAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Add a new welding material from the MPRL (Material and Product Range Library) to the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task AddMaterialWeld(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Define the new welding material by its name in the MPRL.
            ConMprlElement newWeldingMaterial = new ConMprlElement() { MprlName = "S 275" };

            //Add the welding material to the project. It can then be assigned to weld operations.
            await conClient.Material.AddMaterialWeldAsync(conClient.ActiveProjectId, newWeldingMaterial);
            Console.WriteLine("Welding material added to the project: " + newWeldingMaterial.MprlName);

            //Verify by listing the welding materials which are now available in the project.
            List<MatWelding> weldingMaterials = (await conClient.Material.GetWeldingMaterialsAsync(conClient.ActiveProjectId)).Cast<MatWelding>().ToList();

            Console.WriteLine("Welding materials in the project: " + weldingMaterials.Count);
            foreach (MatWelding weldingMaterial in weldingMaterials)
            {
                Console.WriteLine($"Id: {weldingMaterial.Id} Name: {weldingMaterial.Name}");
            }

            //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}/materials/welding

Using the AddMaterialWeldWithHttpInfo variant

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

try
{
    // Adds a material to the project.
    ApiResponse<Object> response = conClient.Material.AddMaterialWeldWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddMaterialWeldWithHttpInfo: " + 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]

AddParametricCrossSectionAsync

ConCrossSection AddParametricCrossSectionAsync (Guid projectId, ConCrossSectionParametricDefinition conCrossSectionParametricDefinition = null)

Creates a parametric cross-section (welded, boxed, cold-formed, parametric rolled) from its shape type and dimensions. Dimension ids are the stable parameter ids the section GET exposes; dimensions not named keep the shape's defaults.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conCrossSectionParametricDefinition ConCrossSectionParametricDefinition Shape type, dimensions and material of the new cross-section. [optional]

Return type

ConCrossSection

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 AddParametricCrossSectionAsyncExample
    {
        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 conCrossSectionParametricDefinition = new ConCrossSectionParametricDefinition(); // ConCrossSectionParametricDefinition | Shape type, dimensions and material of the new cross-section. (optional) 

                    try
                    {
                        // Creates a parametric cross-section (welded, boxed, cold-formed, parametric rolled)  from its shape type and dimensions. Dimension ids are the stable parameter ids the  section GET exposes; dimensions not named keep the shape's defaults.
                        ConCrossSection result = await conClient.Material.AddParametricCrossSectionAsync(projectId, conCrossSectionParametricDefinition);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddParametricCrossSectionAsync: " + 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}/materials/cross-sections/parametric

Using the AddParametricCrossSectionWithHttpInfo variant

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

try
{
    // Creates a parametric cross-section (welded, boxed, cold-formed, parametric rolled)  from its shape type and dimensions. Dimension ids are the stable parameter ids the  section GET exposes; dimensions not named keep the shape's defaults.
    ApiResponse<ConCrossSection> response = conClient.Material.AddParametricCrossSectionWithHttpInfo(projectId, conCrossSectionParametricDefinition);
    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 MaterialApi.AddParametricCrossSectionWithHttpInfo: " + 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]

AddPinAsync

Object AddPinAsync (Guid projectId, ConMprlElement conMprlElement = null)

Add pin to the project. Pins are available only for the ECEN design code; list the accepted names via GET .../materials/pin/library.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
conMprlElement ConMprlElement Definition of a new pin to be added to the project. [optional]

Return type

Object

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 AddPinAsyncExample
    {
        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 conMprlElement = new ConMprlElement(); // ConMprlElement | Definition of a new pin to be added to the project. (optional) 

                    try
                    {
                        // Add pin to the project. Pins are available only for the ECEN design code; list the accepted  names via `GET .../materials/pin/library`.
                        Object result = await conClient.Material.AddPinAsync(projectId, conMprlElement);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.AddPinAsync: " + 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}/materials/pin

Using the AddPinWithHttpInfo variant

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

try
{
    // Add pin to the project. Pins are available only for the ECEN design code; list the accepted  names via `GET .../materials/pin/library`.
    ApiResponse<Object> response = conClient.Material.AddPinWithHttpInfo(projectId, conMprlElement);
    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 MaterialApi.AddPinWithHttpInfo: " + 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]

GetAllMaterialsAsync

List<Object> GetAllMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetAllMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetAllMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetAllMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all materials (steel, concrete, bolt grade, welding, headed stud grade) available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetAllMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all materials in the project. Items are polymorphic IOM materials (e.g. MatSteelEc2, MaterialBoltGrade).
            List<Material> allMaterials = (await conClient.Material.GetAllMaterialsAsync(conClient.ActiveProjectId)).Cast<Material>().ToList();

            Console.WriteLine("Materials in the project: " + allMaterials.Count);
            foreach (Material material in allMaterials)
            {
                Console.WriteLine($"Id: {material.Id} Name: {material.Name} Type: {material.GetType().Name}");
            }

            //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}/materials

Using the GetAllMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetAllMaterialsWithHttpInfo(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 MaterialApi.GetAllMaterialsWithHttpInfo: " + 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]

GetBoltAssembliesAsync

List<Object> GetBoltAssembliesAsync (Guid projectId)

Gets bolt assemblies used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetBoltAssembliesAsyncExample
    {
        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

                    try
                    {
                        // Gets bolt assemblies used in the specified project.
                        List<Object> result = await conClient.Material.GetBoltAssembliesAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetBoltAssembliesAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all bolt assemblies available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetBoltAssemblies(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all bolt assemblies in the project.
            List<BoltAssembly> boltAssemblies = (await conClient.Material.GetBoltAssembliesAsync(conClient.ActiveProjectId)).Cast<BoltAssembly>().ToList();

            Console.WriteLine("Bolt assemblies in the project: " + boltAssemblies.Count);
            foreach (BoltAssembly boltAssembly in boltAssemblies)
            {
                //Dimensions of IOM objects are in SI units (m).
                Console.WriteLine($"Id: {boltAssembly.Id} Name: {boltAssembly.Name} Diameter: {boltAssembly.Diameter} m");
            }

            //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}/materials/bolt-assemblies

Using the GetBoltAssembliesWithHttpInfo variant

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

try
{
    // Gets bolt assemblies used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetBoltAssembliesWithHttpInfo(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 MaterialApi.GetBoltAssembliesWithHttpInfo: " + 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]

GetBoltGradeMaterialsAsync

List<Object> GetBoltGradeMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetBoltGradeMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetBoltGradeMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetBoltGradeMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all bolt grade materials available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetBoltGradeMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all bolt grade materials in the project.
            List<MaterialBoltGrade> boltGrades = (await conClient.Material.GetBoltGradeMaterialsAsync(conClient.ActiveProjectId)).Cast<MaterialBoltGrade>().ToList();

            Console.WriteLine("Bolt grades in the project: " + boltGrades.Count);
            foreach (MaterialBoltGrade boltGrade in boltGrades)
            {
                Console.WriteLine($"Id: {boltGrade.Id} Name: {boltGrade.Name}");
            }

            //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}/materials/bolt-grade

Using the GetBoltGradeMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetBoltGradeMaterialsWithHttpInfo(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 MaterialApi.GetBoltGradeMaterialsWithHttpInfo: " + 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]

GetConcreteMaterialsAsync

List<Object> GetConcreteMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetConcreteMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetConcreteMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetConcreteMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all concrete materials available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetConcreteMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //A steel-to-steel project may not contain any concrete material.
            //Add one from the MPRL first so the list below is not empty.
            await conClient.Material.AddMaterialConcreteAsync(conClient.ActiveProjectId, new ConMprlElement() { MprlName = "C70/85" });

            //Get all concrete materials in the project.
            List<MatConcrete> concreteMaterials = (await conClient.Material.GetConcreteMaterialsAsync(conClient.ActiveProjectId)).Cast<MatConcrete>().ToList();

            Console.WriteLine("Concrete materials in the project: " + concreteMaterials.Count);
            foreach (MatConcrete concrete in concreteMaterials)
            {
                Console.WriteLine($"Id: {concrete.Id} Name: {concrete.Name}");
            }

            //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}/materials/concrete

Using the GetConcreteMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetConcreteMaterialsWithHttpInfo(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 MaterialApi.GetConcreteMaterialsWithHttpInfo: " + 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]

GetCrossSectionAsync

ConCrossSection GetCrossSectionAsync (Guid projectId, int cssId)

Gets one cross-section of the project: the same object the listing returns for it.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
cssId int Id of the cross-section in the project.

Return type

ConCrossSection

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 GetCrossSectionAsyncExample
    {
        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
                    cssId = 56;  // int | Id of the cross-section in the project.

                    try
                    {
                        // Gets one cross-section of the project: the same object the listing returns for it.
                        ConCrossSection result = await conClient.Material.GetCrossSectionAsync(projectId, cssId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetCrossSectionAsync: " + 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

GET /api/5/projects/{projectId}/materials/cross-sections/{cssId}

Using the GetCrossSectionWithHttpInfo variant

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

try
{
    // Gets one cross-section of the project: the same object the listing returns for it.
    ApiResponse<ConCrossSection> response = conClient.Material.GetCrossSectionWithHttpInfo(projectId, cssId);
    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 MaterialApi.GetCrossSectionWithHttpInfo: " + 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]

GetCrossSectionGeometryAsync

ConCrossSectionGeometry GetCrossSectionGeometryAsync (Guid projectId, int cssId)

Gets the evaluated outline geometry of one cross-section: per component the closed outline and the openings as ordered chains of line/arc segments, with the material the component is made of.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
cssId int Id of the cross-section in the project.

Return type

ConCrossSectionGeometry

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 GetCrossSectionGeometryAsyncExample
    {
        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
                    cssId = 56;  // int | Id of the cross-section in the project.

                    try
                    {
                        // Gets the evaluated outline geometry of one cross-section: per component the closed  outline and the openings as ordered chains of line/arc segments, with the material the  component is made of.
                        ConCrossSectionGeometry result = await conClient.Material.GetCrossSectionGeometryAsync(projectId, cssId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetCrossSectionGeometryAsync: " + 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

GET /api/5/projects/{projectId}/materials/cross-sections/{cssId}/geometry

Using the GetCrossSectionGeometryWithHttpInfo variant

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

try
{
    // Gets the evaluated outline geometry of one cross-section: per component the closed  outline and the openings as ordered chains of line/arc segments, with the material the  component is made of.
    ApiResponse<ConCrossSectionGeometry> response = conClient.Material.GetCrossSectionGeometryWithHttpInfo(projectId, cssId);
    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 MaterialApi.GetCrossSectionGeometryWithHttpInfo: " + 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]

GetCrossSectionsAsync

List<ConCrossSection> GetCrossSectionsAsync (Guid projectId)

Gets the cross-sections of the project: id, display name and the definition of each (library / parametric / custom). The evaluated outline of a section is served by cross-sections/{cssId}/geometry.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

Return type

List<ConCrossSection>

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 GetCrossSectionsAsyncExample
    {
        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

                    try
                    {
                        // Gets the cross-sections of the project: id, display name and the definition of each  (library / parametric / custom). The evaluated outline of a section is served by  `cross-sections/{cssId}/geometry`.
                        List<ConCrossSection> result = await conClient.Material.GetCrossSectionsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetCrossSectionsAsync: " + 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.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all cross-sections available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetCrossSections(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all cross-sections in the project: id, name and how each is defined (library / parametric / custom).
            List<ConCrossSection> crossSections = await conClient.Material.GetCrossSectionsAsync(conClient.ActiveProjectId);

            Console.WriteLine("Cross-sections in the project: " + crossSections.Count);
            foreach (ConCrossSection crossSection in crossSections)
            {
                string definition = crossSection.Definition switch
                {
                    ConCrossSectionLibraryDefinition library => $"library {library.MprlName}, material {library.MaterialName}",
                    ConCrossSectionParametricDefinition parametric => $"parametric {parametric.ShapeType}, material {parametric.MaterialName}",
                    ConCrossSectionCustomDefinition custom => $"custom, {custom.Components.Count} component(s)",
                    _ => "unknown",
                };
                Console.WriteLine($"Id: {crossSection.Id} Name: {crossSection.Name} ({definition})");
            }

            //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}/materials/cross-sections

Using the GetCrossSectionsWithHttpInfo variant

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

try
{
    // Gets the cross-sections of the project: id, display name and the definition of each  (library / parametric / custom). The evaluated outline of a section is served by  `cross-sections/{cssId}/geometry`.
    ApiResponse<List<ConCrossSection>> response = conClient.Material.GetCrossSectionsWithHttpInfo(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 MaterialApi.GetCrossSectionsWithHttpInfo: " + 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]

GetHeadedStudGradeMaterialsAsync

List<Object> GetHeadedStudGradeMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetHeadedStudGradeMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetHeadedStudGradeMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetHeadedStudGradeMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.Api.Connection.Model.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all headed stud grade materials available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetHeadedStudGradeMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //A steel-to-steel project may not contain any headed stud grade.
            //Add one from the MPRL first so the list below is not empty.
            await conClient.Material.AddMaterialHeadedStudGradeAsync(conClient.ActiveProjectId, new ConMprlElement() { MprlName = "SD1" });

            //Get all headed stud grade materials in the project.
            List<MaterialHeadedStudGrade> headedStudGrades = (await conClient.Material.GetHeadedStudGradeMaterialsAsync(conClient.ActiveProjectId)).Cast<MaterialHeadedStudGrade>().ToList();

            Console.WriteLine("Headed stud grades in the project: " + headedStudGrades.Count);
            foreach (MaterialHeadedStudGrade headedStudGrade in headedStudGrades)
            {
                Console.WriteLine($"Id: {headedStudGrade.Id} Name: {headedStudGrade.Name}");
            }

            //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}/materials/headed-stud-grade

Using the GetHeadedStudGradeMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetHeadedStudGradeMaterialsWithHttpInfo(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 MaterialApi.GetHeadedStudGradeMaterialsWithHttpInfo: " + 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]

GetMaterialLibraryAsync

List<string> GetMaterialLibraryAsync (Guid projectId, string materialType)

Lists the MPRL names available in the material library for the project's design code.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
materialType string Material type to list (steel, concrete, bolt-grade, welding, headed-stud-grade, reinforcement, pin, cross-sections, bolt-assemblies).

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 GetMaterialLibraryAsyncExample
    {
        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
                    materialType = "materialType_example";  // string | Material type to list (steel, concrete, bolt-grade, welding, headed-stud-grade, reinforcement, pin, cross-sections, bolt-assemblies).

                    try
                    {
                        // Lists the MPRL names available in the material library for the project's design code.
                        List<string> result = await conClient.Material.GetMaterialLibraryAsync(projectId, materialType);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetMaterialLibraryAsync: " + 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

GET /api/5/projects/{projectId}/materials/{materialType}/library

Using the GetMaterialLibraryWithHttpInfo variant

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

try
{
    // Lists the MPRL names available in the material library for the project's design code.
    ApiResponse<List<string>> response = conClient.Material.GetMaterialLibraryWithHttpInfo(projectId, materialType);
    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 MaterialApi.GetMaterialLibraryWithHttpInfo: " + 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]

GetParametricCrossSectionShapeTemplateAsync

ConCrossSectionParametricDefinition GetParametricCrossSectionShapeTemplateAsync (Guid projectId, string shapeType)

The fill-in template of a parametric shape: every dimension with its stable id, its stable code name (e.g. "wH") and the shape's default value, in SI units. Change the values you care about, set the material, and POST it to cross-sections/parametric.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
shapeType string Shape type name from `cross-sections/parametric/shapes`.

Return type

ConCrossSectionParametricDefinition

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 GetParametricCrossSectionShapeTemplateAsyncExample
    {
        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
                    shapeType = "shapeType_example";  // string | Shape type name from `cross-sections/parametric/shapes`.

                    try
                    {
                        // The fill-in template of a parametric shape: every dimension with its stable id, its  stable code name (e.g. \"wH\") and the shape's default value, in SI units. Change the  values you care about, set the material, and POST it to  `cross-sections/parametric`.
                        ConCrossSectionParametricDefinition result = await conClient.Material.GetParametricCrossSectionShapeTemplateAsync(projectId, shapeType);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetParametricCrossSectionShapeTemplateAsync: " + 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

GET /api/5/projects/{projectId}/materials/cross-sections/parametric/shapes/{shapeType}

Using the GetParametricCrossSectionShapeTemplateWithHttpInfo variant

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

try
{
    // The fill-in template of a parametric shape: every dimension with its stable id, its  stable code name (e.g. \"wH\") and the shape's default value, in SI units. Change the  values you care about, set the material, and POST it to  `cross-sections/parametric`.
    ApiResponse<ConCrossSectionParametricDefinition> response = conClient.Material.GetParametricCrossSectionShapeTemplateWithHttpInfo(projectId, shapeType);
    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 MaterialApi.GetParametricCrossSectionShapeTemplateWithHttpInfo: " + 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]

GetParametricCrossSectionShapesAsync

List<string> GetParametricCrossSectionShapesAsync (Guid projectId)

Lists the shape types the parametric cross-section endpoints accept (e.g. "Iw", "Tw", "CHSPar"). Get a shape's fill-in template from cross-sections/parametric/shapes/{shapeType}.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetParametricCrossSectionShapesAsyncExample
    {
        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

                    try
                    {
                        // Lists the shape types the parametric cross-section endpoints accept (e.g. \"Iw\", \"Tw\",  \"CHSPar\"). Get a shape's fill-in template from  `cross-sections/parametric/shapes/{shapeType}`.
                        List<string> result = await conClient.Material.GetParametricCrossSectionShapesAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetParametricCrossSectionShapesAsync: " + 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

GET /api/5/projects/{projectId}/materials/cross-sections/parametric/shapes

Using the GetParametricCrossSectionShapesWithHttpInfo variant

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

try
{
    // Lists the shape types the parametric cross-section endpoints accept (e.g. \"Iw\", \"Tw\",  \"CHSPar\"). Get a shape's fill-in template from  `cross-sections/parametric/shapes/{shapeType}`.
    ApiResponse<List<string>> response = conClient.Material.GetParametricCrossSectionShapesWithHttpInfo(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 MaterialApi.GetParametricCrossSectionShapesWithHttpInfo: " + 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]

GetPinsAsync

List<Object> GetPinsAsync (Guid projectId)

Gets pins used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetPinsAsyncExample
    {
        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

                    try
                    {
                        // Gets pins used in the specified project.
                        List<Object> result = await conClient.Material.GetPinsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetPinsAsync: " + 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

GET /api/5/projects/{projectId}/materials/pin

Using the GetPinsWithHttpInfo variant

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

try
{
    // Gets pins used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetPinsWithHttpInfo(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 MaterialApi.GetPinsWithHttpInfo: " + 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]

GetReinforcementMaterialsAsync

List<Object> GetReinforcementMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetReinforcementMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetReinforcementMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetReinforcementMaterialsAsync: " + 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

GET /api/5/projects/{projectId}/materials/reinforcement

Using the GetReinforcementMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetReinforcementMaterialsWithHttpInfo(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 MaterialApi.GetReinforcementMaterialsWithHttpInfo: " + 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]

GetSteelMaterialsAsync

List<Object> GetSteelMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetSteelMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetSteelMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetSteelMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all steel materials available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetSteelMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all steel materials in the project. Items are polymorphic IOM materials (e.g. MatSteelEc2).
            List<MatSteel> steelMaterials = (await conClient.Material.GetSteelMaterialsAsync(conClient.ActiveProjectId)).Cast<MatSteel>().ToList();

            Console.WriteLine("Steel materials in the project: " + steelMaterials.Count);
            foreach (MatSteel steel in steelMaterials)
            {
                Console.WriteLine($"Id: {steel.Id} Name: {steel.Name}");
            }

            //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}/materials/steel

Using the GetSteelMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetSteelMaterialsWithHttpInfo(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 MaterialApi.GetSteelMaterialsWithHttpInfo: " + 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]

GetWeldingMaterialsAsync

List<Object> GetWeldingMaterialsAsync (Guid projectId)

Gets materials used in the specified project.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.

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 GetWeldingMaterialsAsyncExample
    {
        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

                    try
                    {
                        // Gets materials used in the specified project.
                        List<Object> result = await conClient.Material.GetWeldingMaterialsAsync(projectId);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.GetWeldingMaterialsAsync: " + e.Message);
                        Console.WriteLine("Status Code: " + e.ErrorCode);
                        Console.WriteLine(e.StackTrace);
                    }
                    finally
                    {
                        await conClient.Project.CloseProjectAsync(projectId);
                    }
                }
            }
        }
    }
}

Code Samples

using IdeaRS.OpenModel.Material;
using IdeaStatiCa.ConnectionApi;

namespace CodeSamples
{
    public partial class ClientExamples
    {
        /// <summary>
        /// Get all welding materials available in the project.
        /// </summary>
        /// <param name="conClient">The connected API Client</param>
        public static async Task GetWeldingMaterials(IConnectionApiClient conClient)
        {
            string filePath = "Inputs/simple cleat connection.ideaCon";
            await conClient.Project.OpenProjectAsync(filePath);

            //Get all welding materials in the project. Items are polymorphic IOM materials (e.g. MatWeldingEc2).
            List<MatWelding> weldingMaterials = (await conClient.Material.GetWeldingMaterialsAsync(conClient.ActiveProjectId)).Cast<MatWelding>().ToList();

            Console.WriteLine("Welding materials in the project: " + weldingMaterials.Count);
            foreach (MatWelding weldingMaterial in weldingMaterials)
            {
                Console.WriteLine($"Id: {weldingMaterial.Id} Name: {weldingMaterial.Name}");
            }

            //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}/materials/welding

Using the GetWeldingMaterialsWithHttpInfo variant

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

try
{
    // Gets materials used in the specified project.
    ApiResponse<List<Object>> response = conClient.Material.GetWeldingMaterialsWithHttpInfo(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 MaterialApi.GetWeldingMaterialsWithHttpInfo: " + 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]

UpdateParametricCrossSectionAsync

ConCrossSection UpdateParametricCrossSectionAsync (Guid projectId, int cssId, ConCrossSectionParametricDefinition conCrossSectionParametricDefinition = null)

Replaces the definition of parametric cross-section cssId with the given one — a full replacement: dimensions not named revert to the shape's defaults, so send the complete definition obtained from the section GET. Answers 409 when the id stores a library or general section.

Parameters

Name Type Description Notes
projectId Guid The unique identifier of the opened project in the ConnectionRestApi service.
cssId int Id of the parametric cross-section to replace.
conCrossSectionParametricDefinition ConCrossSectionParametricDefinition Shape type, dimensions and material replacing the stored definition. [optional]

Return type

ConCrossSection

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 UpdateParametricCrossSectionAsyncExample
    {
        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
                    cssId = 56;  // int | Id of the parametric cross-section to replace.
                    var conCrossSectionParametricDefinition = new ConCrossSectionParametricDefinition(); // ConCrossSectionParametricDefinition | Shape type, dimensions and material replacing the stored definition. (optional) 

                    try
                    {
                        // Replaces the definition of parametric cross-section cssId with the  given one — a full replacement: dimensions not named revert to the shape's defaults,  so send the complete definition obtained from the section GET. Answers 409 when the id  stores a library or general section.
                        ConCrossSection result = await conClient.Material.UpdateParametricCrossSectionAsync(projectId, cssId, conCrossSectionParametricDefinition);
                        Debug.WriteLine(result);
                    }
                    catch (ApiException  e)
                    {
                        Console.WriteLine("Exception when calling Material.UpdateParametricCrossSectionAsync: " + 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

PUT /api/5/projects/{projectId}/materials/cross-sections/parametric/{cssId}

Using the UpdateParametricCrossSectionWithHttpInfo variant

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

try
{
    // Replaces the definition of parametric cross-section cssId with the  given one — a full replacement: dimensions not named revert to the shape's defaults,  so send the complete definition obtained from the section GET. Answers 409 when the id  stores a library or general section.
    ApiResponse<ConCrossSection> response = conClient.Material.UpdateParametricCrossSectionWithHttpInfo(projectId, cssId, conCrossSectionParametricDefinition);
    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 MaterialApi.UpdateParametricCrossSectionWithHttpInfo: " + 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 -
409 Conflict -
422 Unprocessable Content -
500 Internal Server Error -

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