API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

AnalysisResult Class

The AnalysisResult class contains analysis result information.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.AnalysisAnalysisResult

Namespace:  Tekla.Structures.Analysis
Assembly:  Tekla.Structures.Analysis (in Tekla.Structures.Analysis.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public sealed class AnalysisResult

The AnalysisResult type exposes the following members.

Constructors
  Name Description
Public method AnalysisResult
Creates a new analysis result instance.
Top
Properties
  Name Description
Public property LoadCase
The load case. The real load cases have positive values 1, 2, 3, ... For min/max queries LoadCaseForMinMaxEnum can be used.
Public property LoadCaseInfo
The load case info (optional, max length 128).
Public property LoadCaseName
The load case name (max length 64).
Public property LoadCaseType
The load case type.
Public property ModId
The time stamp of the result.
Public property ObjectId
The identifier of the object. If ObjectType is OBJECT_TYPE_PART, ObjectId is (physical) part ID. If ObjectType is OBJECT_TYPE_MEMBER, ObjectId is the bar number when analysis bars are used in integration, otherwise ObjectId is the member number. If ObjectType is OBJECT_TYPE_AREA, ObjectId is the area number.
Public property ObjectType
The object type. In result query the only supported type is the physical member (the part).
Public property Position
The position on the part's START/END/...
Public property PositionCoordX
Global coordinate X (mm) when inserting result. Local (part) coordinate X (mm) when getting results.
Public property PositionCoordY
Global coordinate Y (mm) when inserting result. Local (part) coordinate Y (mm) when getting results.
Public property PositionCoordZ
Global coordinate Z (mm) when inserting result. Local (part) coordinate Z (mm) when getting results.
Public property PositionTolerance
The position's coordinate tolerance.
Public property Value
The result value.
Public property ValueType
The result value type.
Top
Methods
  Name Description
Public methodStatic memberCode example Delete
Delete analysis results by the given key.
Public methodStatic memberCode example DeleteAll
Delete all analysis results.
Public methodStatic memberCode example DeleteLoadcase
Delete analysis results by load case.
Public methodStatic member GetResultObjectIds
Get ID numbers of objects with results.
Public methodStatic member GetResults
Get analysis results.
Public methodCode example Insert
Insert analysis result. Analysis model has to be active.
Public method QueryAnalysisResult
Queries an analysis result.
Top
Examples
The following example queries a single analysis result value.
using Tekla.Structures.Analysis;

public class Example
{
       public void Example1()
       {
           int PartId = 0;

           AnalysisResult AnalysisResult = new AnalysisResult();

           AnalysisResult.ObjectType = AnalysisResult.ObjectTypeEnum.OBJECT_TYPE_PART;
           AnalysisResult.ObjectId = PartId;
           AnalysisResult.LoadCase = (int)AnalysisResult.LoadCaseForMinMaxEnum.LOADCASE_WITH_MAX_ABSOLUTE_VALUE;
           AnalysisResult.Position = AnalysisResult.ResultPositionEnum.POSITION_BEAM_START_POINT;
           AnalysisResult.PositionCoordX = 0.0;
           AnalysisResult.PositionCoordY = 0.0;
           AnalysisResult.PositionCoordZ = 0.0;
           AnalysisResult.PositionTolerance = 0.1;
           AnalysisResult.ValueType = AnalysisResult.ValueTypeEnum.VALUETYPE_SHEAR_Y;

           bool Result = AnalysisResult.QueryAnalysisResult();

           double ResultValue = AnalysisResult.Value;
       }
}
See Also