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.

OperationCopyObject Method (ModelObject, Vector)

Copies the model object using the given translation vector.

Namespace:  Tekla.Structures.Model.Operations
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.1
public static ModelObject CopyObject(
	ModelObject Object,
	Vector CopyVector


Type: Tekla.Structures.ModelModelObject
The model object to copy.
Type: Tekla.Structures.Geometry3dVector
The translation vector for copying.

Return Value

Type: ModelObject
The copied model object on success, null on failure.
In the following example a connection to the Tekla Structures model has already been established. The example code creates a beam to the model and copies the beam to a location that is one meter in the x and y directions.
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));
           Vector Vector1 = new Vector(1000, 1000, 0);
           Beam1.Profile.ProfileString = "PL10*140";
               Beam Beam2 = Operation.CopyObject(Beam1, Vector1) as Beam;
               if(Beam2 != null)
                   MessageBox.Show("Copy 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.