Tekla Open API

Detailed and full API reference helps you master Tekla Open API

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

Operation Methods

The Operation type exposes the following members.

Methods
  Name Description
Public methodStatic memberCode example AddToPourUnit
Adds model objects as part of a pour unit Model object types accepted are assembly types except cast in situ, reinforcements of different kind, components and bolts
Public methodStatic member CalculatePourUnits
Calculate and assign objects to pour unit Model object types that are associated with pour unit are assembly types except cast in situ, reinforcements of different kind, components and screws
Public methodStatic member Combine(Beam, Beam)
Combines two beams into one beam.
Public methodStatic member Combine(RebarGroup, RebarGroup)
Combines two rebar groups into one rebar group.
Public methodStatic member Combine(SingleRebar, SingleRebar)
Combines two single rebars into one rebar.
Public methodStatic memberCode example CopyObject(ModelObject, Vector)
Copies the model object using the given translation vector.
Public methodStatic memberCode example CopyObject(ModelObject, CoordinateSystem, CoordinateSystem)
Copies the model object between the given translation coordinate systems.
Public methodStatic member CreateBentPlateByFaces(Part, IListPoint, Part, IListPoint)
Public methodStatic member CreateBentPlateByFaces(Part, Face, Part, Face)
Modifies the first plate by adding a cylindrical bend that connects it to the second plate creating a new BentPlate instance based on two parts and selected faces in each part. See CreateBentPlateByFaces(Part, Face, Part, Face, BentPlateBendShape).
Public methodStatic member CreateBentPlateByFaces(Part, IListPoint, Part, IListPoint, Double)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts, selected faces in each part and radius. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, Double).
Public methodStatic member CreateBentPlateByFaces(Part, IListPoint, Part, IListPoint, BentPlateBendShape)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts and selected faces in each part. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, BentPlateBendShape).
Public methodStatic member CreateBentPlateByFaces(Part, Face, Part, Face, Double)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts and selected faces in each part and radius. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, Double).
Public methodStatic member CreateBentPlateByFaces(Part, Face, Part, Face, BentPlateBendShape)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts and selected faces in each part. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, BentPlateBendShape).
Public methodStatic member CreateBentPlateByParts(Part, Part)
Modifies the first plate by adding a cylindrical bend that connects it to the second plate creating a new BentPlate instance based on two parts. See CreateBentPlateByParts(Part, Part, BentPlateBendShape).
Public methodStatic member CreateBentPlateByParts(Part, Part, Double)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts and a radius. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, ConnectiveGeometry, Double).
Public methodStatic member CreateBentPlateByParts(Part, Part, BentPlateBendShape)
Modifies the first plate by adding a bend that connects it to the second plate creating a new BentPlate instance based on two parts. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, ConnectiveGeometry, BentPlateBendShape).
Public methodStatic member CreateConicalBentPlateByFaces(Part, IListPoint, Part, IListPoint, Double, Double)
Modifies the first plate by adding a conical bend that connects it to the second plate creating a new BentPlate instance based on two parts, selected faces in each part and radius. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, Double).
Public methodStatic member CreateConicalBentPlateByFaces(Part, Face, Part, Face, Double, Double)
Modifies the first plate by adding a conical bend that connects it to the second plate creating a new BentPlate instance based on two parts and selected faces in each part, and the largest radius of the conical section and the cone aperture. This method can change GUID when using from plug-ins. To keep GUID, use AddLeg(ConnectiveGeometry, LineSegment, ConnectiveGeometry, LineSegment, Double).
Public methodStatic member CreateConicalBentPlateByPartsAndAperture
Modifies the first plate by adding a conical bend that connects it to the second plate creating a new BentPlate instance based on two parts. The resulting bend will have the given aperture and the provided larger radius.
Public methodStatic member CreateConicalBentPlateByPartsAndTwoRadiuses
Modifies the first plate by adding a conical bend that connects it to the second plate creating a new BentPlate instance based on two parts. The resulting bend will have the two given radiuses.
Public methodStatic memberCode example CreateMISFileFromAll
Creates MIS files from all parts using the given file name.

See Tekla Structures Help for more information about MIS files.

Public methodStatic memberCode example CreateMISFileFromSelected
Creates MIS files from the selected parts using the given file name.

See Tekla Structures Help for more information about MIS files.

Public methodStatic memberCode example CreateNCFilesByPartId
Creates NC files from the selected parts using the given NC template name.

See Tekla Structures Help for more information about NC files.

Public methodStatic memberCode example CreateNCFilesFromAll(String, String)
Creates NC files from all parts using the given NC template name.

See Tekla Structures Help for more information about NC files.

Public methodStatic memberCode example CreateNCFilesFromAll(String, String, Boolean, String, Boolean, String)
Creates NC files from all parts using the given NC template name.

See Tekla Structures Help for more information about NC files.

Public methodStatic memberCode example CreateNCFilesFromSelected(String, String)
Creates NC files from the selected parts using the given NC template name.

See Tekla Structures Help for more information about NC files.

Public methodStatic memberCode example CreateNCFilesFromSelected(String, String, Boolean, String, Boolean, String)
Creates NC files from the selected parts using the given NC template name.

See Tekla Structures Help for more information about NC files.

Public methodStatic memberCode example CreateReportFromAll
Creates a report from all the objects using the given template name and filename.

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.

Internally, this method is asynchronous, and because of that the output file cannot be immediately available.

See Tekla Structures Help for more information about reports.

Public methodStatic memberCode example CreateReportFromSelected
Creates a report from the selected objects using the given template name and filename.

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.

Public methodStatic member DisplayPrompt
Displays a message in the status bar.
Public methodStatic member DisplayReport
Opens and displays a report with the given name.

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

See Tekla Structures Help for more information about reports.

Public methodStatic member ExplodeBentPlate
Deletes bentPlate and inserts ContourPlates instances equivalent to the ones used to create bentPlate. The ContourPlate created from the main polygon has the same identifier as bentPlate.
Public methodStatic member GetSimilarNumberedObjects
Gets similar objects based on numbering of given object.
Public methodStatic member Group
Groups a list of single rebars or rebar groups and creates a new rebar group.
Public methodStatic member IsMacroRunning
Returns true if a macro is running, false otherwise.

Macros are saved as *.cs files in the folder defined with the XS_MACRO_DIRECTORY variable.

See Tekla Structures Help for more information about macros.

Public methodStatic member IsModelAutoSaved Obsolete.
Tells whether a model has auto saved information.
Public methodStatic member IsNumberingUpToDate
Checks whether the numbering is up-to-date for an assembly, a part or a rebar.
Public methodStatic member IsNumberingUpToDateAll
Checks whether the numbering is up-to-date for every assembly, part and rebar on the model.
Remarks
Using this method is much faster than checking each object individually.
Public methodStatic memberCode example MoveObject(ModelObject, Vector)
Moves the model object using the given translation vector.
Public methodStatic memberCode example MoveObject(ModelObject, CoordinateSystem, CoordinateSystem)
Moves the model object between the given translation coordinate systems.
Public methodStatic member ObjectMatchesToFilter(ModelObject, String)
Checks whether the object matches to the criteria in the given filter.
Public methodStatic memberCode example ObjectMatchesToFilter(ModelObject, FilterExpression)
Checks whether the object matches to the criteria in the given filter.
Public methodStatic member Open(String) Obsolete.
Opens a new model to Tekla Structures ignoring auto saved information.
Public methodStatic member Open(String, Boolean) Obsolete.
Opens a new model to Tekla Structures.
Public methodStatic memberCode example RemoveFromPourUnit
Removes model object from pour unit Model object types accepted are assembly types except cast in situ, reinforcements of different kind, components and bolts
Public methodStatic memberCode example RunMacro
Starts a macro with the given name. Throws an exception if the file is not found.

Macros are saved as *.cs files in the folder defined with the XS_MACRO_DIRECTORY variable.

It is possible to run drawing macros using relative paths.

See Tekla Structures Help for more information about macros.

Public methodStatic member SaveAsWebModel
Saves the current model as a web model.

You can save the model as a web model that can be viewed via the Internet using a web browser (e.g. Internet Explorer).

Public methodStatic member SaveSelectedAsWebModel
Saves the selected objects as a web model.

You can save the selected objects as a web model that can be viewed via the Internet using a web browser (e.g. Internet Explorer).

Public methodStatic member ShowOnlySelected
Show Only Selected objects in current view.
Public methodStatic member Split(Beam, Point)
Splits the beam and creates a new one in the given position.
Public methodStatic member Split(CircleRebarGroup, Line)
Splits the circle rebar group and creates a new one in the given position.
Public methodStatic member Split(ContourPlate, Polygon)
Splits the contour plate and creates a new one along the given polygon.
Public methodStatic member Split(CurvedRebarGroup, Line)
Splits the curved rebar group and creates a new one in the given position.
Public methodStatic member Split(RebarGroup, Line)
Splits the rebar group and creates a new one in the given position.
Public methodStatic member Split(SingleRebar, Line)
Splits the single rebar and creates a new one in the given position.
Public methodStatic member Ungrouping(RebarGroup)
Ungroups the rebar group and creates new single rebars.
Public methodStatic member Ungrouping(RebarMesh)
Ungroups the rebar mesh and creates new single rebars.
Top
See Also