OperationCreateReport Method

Creates a report using the given report parameters.

A template with the name given in the TemplateName parameter must exist in model folder or in the folder defined with the advanced option XS_TEMPLATE_DIRECTORY.

If a path is not given in the filename, the file is created to the folder defined with the advanced option XS_REPORT_OUTPUT_DIRECTORY.

If the given folder does not exist, the report creation fails.

See Tekla Structures Help for more information about reports.

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
Syntax
public static bool CreateReport(
	OperationReportParameters parameters
)

Parameters

parameters
Type: Tekla.Structures.Model.OperationsOperationReportParameters
The report parameters.

Return Value

Type: Boolean
True if the report is created.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when the parameters.TemplateName.TemplateName or parameters.FileName.FileName is null.
ArgumentExceptionThrown when the parameters.TemplateName.TemplateName or parameters.FileName.FileName is too short.
Examples
using Tekla.Structures.Model;
using Tekla.Structures.Model.Operations;
using Tekla.Structures.Geometry3d;

using System.Collections;

public class Example
{
       public void Example1()
       {
           Model Model = new Model();

           Beam B = new Beam(new Point(0,0,0), new Point(0,0,6000));
           Beam B1 = new Beam(new Point(0,1000,0), new Point(0,1000,6000));
           Beam B2 = new Beam(new Point(0,2000,0), new Point(0,2000,6000));

           B.Insert();
           B1.Insert();
           B2.Insert();

           ArrayList ObjectsToSelect = new ArrayList();
           ObjectsToSelect.Add(B);
           ObjectsToSelect.Add(B2);
           Model.CommitChanges();

           Tekla.Structures.Model.UI.ModelObjectSelector ModelSelector = new Tekla.Structures.Model.UI.ModelObjectSelector();
           ModelSelector.Select(ObjectsToSelect);

           Operation.CreateReport(new ReportParameters{
                TemplateName = "Assembly_list",
                FileName = "Assembly_list_selected.xsr",
                Title1 = "MyTitle",
                Title2 = "",
                Title3 = "",
                IsFromSelected = true });
           Operation.DisplayReport("Assembly_list_selected.xsr");
       }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next