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.

OperationMoveObject Method (ModelObject, CoordinateSystem, CoordinateSystem)

Moves the model object between the given translation coordinate systems.

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.1
public static bool MoveObject(
	ModelObject Object,
	CoordinateSystem StartCoordinateSystem,
	CoordinateSystem EndCoordinateSystem


Type: Tekla.Structures.ModelModelObject
The model object to move.
Type: Tekla.Structures.Geometry3dCoordinateSystem
The coordinate system to move the object from.
Type: Tekla.Structures.Geometry3dCoordinateSystem
The coordinate system to move the object to.

Return Value

Type: Boolean
True on success, false on failure.

Note that the object is moved and updated in the view so ModelObject.Modify() is not needed. Call Modify() only after the object's data has been updated with the ModelObject.Select() method.

In the following example a connection to the Tekla Structures model has already been established. The example code creates a beam (Beam3) to the model and moves the beam between the coordinate systems of Beam1 and Beam2.
using Tekla.Structures.Model;
using Tekla.Structures.Model.Operations;
using Tekla.Structures.Geometry3d;
using System.Windows.Forms;

public class Example
       public void Example1()
           Beam Beam1 = new Beam(new Point(0, 0, 0), new Point(3000, 0, 0));
           Beam1.Profile.ProfileString = "PL10*140";

           Beam Beam2 = new Beam(new Point(3000, 0, 0), new Point(6000, 0, 0));
           Beam2.Profile.ProfileString = "PL10*140";

           Beam Beam3 = new Beam(new Point(100, 0, 0), new Point(100, 0, 400));
           Beam3.Profile.ProfileString = "PL10*140";

           if(Operation.MoveObject(Beam3, Beam1.GetCoordinateSystem(), Beam2.GetCoordinateSystem()))
               MessageBox.Show("Move succeeded");
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.