ExportApi
| Method | Description |
|---|---|
| ExportDWGAsync | Exports the connection to DWG format. Internally opens the project on the cloud Viewer, starts a Forge work item via the async DWG flow, blocks until completion (up to 10 minutes), then streams the generated DWG. The client does not need to pass any authentication — the ConnectionRestApi reuses the IDEA license access token from the Credential Manager (via AuthenticatedHttpRequestsDelegatingHandler) when calling the Viewer's authenticated DWG endpoints. User identity (email) is part of that JWT. |
| ExportIFCAsync | Exports the connection to IFC format. |
| ExportIomAsync | Exports the connection to XML which includes the OpenModelContainer (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs). |
| ExportIomConnectionDataAsync | Gets the ConnectionData for the specified connection (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs). |
ExportDWGAsync
void ExportDWGAsync (Guid projectId, int connectionId)
Exports the connection to DWG format. Internally opens the project on the cloud Viewer, starts a Forge work item via the async DWG flow, blocks until completion (up to 10 minutes), then streams the generated DWG. The client does not need to pass any authentication — the ConnectionRestApi reuses the IDEA license access token from the Credential Manager (via AuthenticatedHttpRequestsDelegatingHandler) when calling the Viewer's authenticated DWG endpoints. User identity (email) is part of that JWT.
Extension Methods
This operation has an avaliable client extension method. Refer to code samples for extension method usage.
ExportDwgFile(...)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened local project. | |
| connectionId | int | The local id of the connection to export. |
Return type
void (empty response body)
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 ExportDWGAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
connectionId = 56; // int | The local id of the connection to export.
try
{
// Exports the connection to DWG format. Internally opens the project on the cloud Viewer, starts a Forge work item via the async DWG flow, blocks until completion (up to 10 minutes), then streams the generated DWG. The client does not need to pass any authentication — the ConnectionRestApi reuses the IDEA license access token from the Credential Manager (via AuthenticatedHttpRequestsDelegatingHandler) when calling the Viewer's authenticated DWG endpoints. User identity (email) is part of that JWT.
conClient.Export.ExportDWGAsync(projectId, connectionId);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Export.ExportDWGAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
It looks like the sample you are looking for does not exist.
Looking for a code sample? request some help on our discussion page.
REST Usage
Http Request
All URIs are relative to http://localhost
GET /api/4/projects/{projectId}/connections/{connectionId}/export-dwg
Using the ExportDWGWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Exports the connection to DWG format. Internally opens the project on the cloud Viewer, starts a Forge work item via the async DWG flow, blocks until completion (up to 10 minutes), then streams the generated DWG. The client does not need to pass any authentication — the ConnectionRestApi reuses the IDEA license access token from the Credential Manager (via AuthenticatedHttpRequestsDelegatingHandler) when calling the Viewer's authenticated DWG endpoints. User identity (email) is part of that JWT.
conClient.Export.ExportDWGWithHttpInfo(projectId, connectionId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExportApi.ExportDWGWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExportIFCAsync
string ExportIFCAsync (Guid projectId, int connectionId)
Exports the connection to IFC format.
Extension Methods
This operation has an avaliable client extension method. Refer to code samples for extension method usage.
ExportIfcFile(...)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection to export. |
Return type
string
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;
namespace Example
{
public class ExportIFCAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
connectionId = 56; // int | The ID of the connection to export.
try
{
// Exports the connection to IFC format.
string result = await conClient.Export.ExportIFCAsync(projectId, connectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Export.ExportIFCAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// This example exports the connection to an Ifc to an Ifc file (.ifc).
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task ExportIfc(IConnectionApiClient conClient)
{
string filePath = "Inputs/simple knee connection.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
string exampleFolderPath = GetExampleFolderPathOnDesktop("ExportIFC");
string connectionName = string.IsNullOrEmpty(connections[0].Name) ? "Conn1" : connections[0].Name;
string ifcPath = Path.Combine(exampleFolderPath, connectionName + ".ifc");
//Export the connection to Ifc file.
await conClient.Export.ExportIfcFileAsync(conClient.ActiveProjectId, connectionId, ifcPath);
//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/4/projects/{projectId}/connections/{connectionId}/export-ifc
Using the ExportIFCWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Exports the connection to IFC format.
ApiResponse<string> response = conClient.Export.ExportIFCWithHttpInfo(projectId, connectionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExportApi.ExportIFCWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: text/plain
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]
ExportIomAsync
string ExportIomAsync (Guid projectId, int connectionId, string version = null)
Exports the connection to XML which includes the OpenModelContainer (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs).
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection to export. | |
| version | string | Optional version string for downgrading the IOM model. | [optional] |
Return type
string
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;
namespace Example
{
public class ExportIomAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
connectionId = 56; // int | The ID of the connection to export.
version = "version_example"; // string | Optional version string for downgrading the IOM model. (optional)
try
{
// Exports the connection to XML which includes the OpenModelContainer (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs).
string result = await conClient.Export.ExportIomAsync(projectId, connectionId, version);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Export.ExportIomAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// This example exports the connection to Idea Open Model (IOM).
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task ExportIomModel(IConnectionApiClient conClient)
{
string filePath = "Inputs/HSS_norm_cond.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
//FIX Needs to output the Iom Model xml.
await conClient.Export.ExportIomAsync(conClient.ActiveProjectId, connectionId);
//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/4/projects/{projectId}/connections/{connectionId}/export-iom
Using the ExportIomWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Exports the connection to XML which includes the OpenModelContainer (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/OpenModelContainer.cs).
ApiResponse<string> response = conClient.Export.ExportIomWithHttpInfo(projectId, connectionId, version);
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 ExportApi.ExportIomWithHttpInfo: " + 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/xml, text/plain
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]
ExportIomConnectionDataAsync
ConnectionData ExportIomConnectionDataAsync (Guid projectId, int connectionId)
Gets the ConnectionData for the specified connection (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs).
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| projectId | Guid | The unique identifier of the opened project. | |
| connectionId | int | The ID of the connection to export. |
Return type
Example
Note: this example is autogenerated.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using IdeaStatiCa.ConnectionApi.Api;
using IdeaStatiCa.ConnectionApi.Client;
using IdeaStatiCa.ConnectionApi.Model;
namespace Example
{
public class ExportIomConnectionDataAsyncExample
{
public static async Task Main()
{
string ideaConFile = "testCon.ideaCon";
string ideaStatiCaPath = "C:\\Program Files\\IDEA StatiCa\\StatiCa 26.0"; // Path to the IdeaStatiCa.ConnectionRestApi.exe
using (var clientFactory = new ConnectionApiServiceRunner(ideaStatiCaPath))
{
using (var conClient = await clientFactory.CreateApiClient())
{
// Open the project and get its id
var projData = await conClient.Project.OpenProjectAsync(ideaConFile);
Guid projectId = projData.ProjectId;
// (Required) Select parameters
connectionId = 56; // int | The ID of the connection to export.
try
{
// Gets the ConnectionData for the specified connection (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs).
ConnectionData result = await conClient.Export.ExportIomConnectionDataAsync(projectId, connectionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Export.ExportIomConnectionDataAsync: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
finally
{
await conClient.Project.CloseProjectAsync(projectId);
}
}
}
}
}
}
Code Samples
using IdeaRS.OpenModel.Connection;
using IdeaStatiCa.ConnectionApi;
namespace CodeSamples
{
public partial class ClientExamples
{
/// <summary>
/// Gets the IOM Connection Data associated with a given connection.
/// </summary>
/// <param name="conClient">The connected API Client</param>
public static async Task ExportIomConnectionData(IConnectionApiClient conClient)
{
string filePath = "Inputs/HSS_norm_cond.ideaCon";
await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);
int connectionId = connections[0].Id;
ConnectionData conData = await conClient.Export.ExportIomConnectionDataAsync(conClient.ActiveProjectId, connectionId);
//Print the connection data to the Console.
Console.WriteLine($"Number of Plates: { conData.Plates.Count()}");
Console.WriteLine($"Number of BoltGrids: {conData.BoltGrids.Count()}");
Console.WriteLine($"Number of Welds: {conData.Welds.Count()}");
Console.WriteLine($"Number of Cuts: {conData.CutBeamByBeams.Count()}");
//Close the opened project.
await conClient.Project.CloseProjectAsync(conClient.ActiveProjectId);
}
}
}
Looking for a code sample? request some help on our discussion page.
REST Usage
Http Request
All URIs are relative to http://localhost
GET /api/4/projects/{projectId}/connections/{connectionId}/export-iom-connection-data
Using the ExportIomConnectionDataWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets the ConnectionData for the specified connection (https://github.com/idea-statica/ideastatica-public/blob/main/src/IdeaRS.OpenModel/Connection/ConnectionData.cs).
ApiResponse<ConnectionData> response = conClient.Export.ExportIomConnectionDataWithHttpInfo(projectId, connectionId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ExportApi.ExportIomConnectionDataWithHttpInfo: " + 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, application/xml
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]