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.

EmbeddedObjectBaseMoveObjectRelative Method

Moves the object according to the given move vector.

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
public bool MoveObjectRelative(
	Vector moveVector
)

Parameters

moveVector
Type: Tekla.Structures.Geometry3dVector
The move vector to be used.

Return Value

Type: Boolean
True.

Implements

IMovableRelativeMoveObjectRelative(Vector)
Examples
The following example calculates a move vector from two points. The move vector in the example will move an object 1000 points in the +X direction.
using Tekla.Structures.Drawing;
using Tekla.Structures.Geometry3d;

public class Example
{
       public void Example1()
       {
           DrawingHandler MyDrawingHandler = new DrawingHandler();
           DwgObject exampleObject = new DwgObject(MyDrawingHandler.GetActiveDrawing().GetSheet().GetAllViews().Current as ViewBase,
               new Point(100, 100), "filename");

           Vector moveVector = new Vector(new Point(1000, 0) - new Point(0, 0));
           exampleObject.MoveObjectRelative(moveVector);
       }
}
See Also