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.


PickerPickObject Method (String, Type, DrawingObject, ViewBase, Point)

Requests the user to pick one object of the given types. Returns the picked point in addition to the picked object.

Namespace:  Tekla.Structures.Drawing.UI
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2020.0.0.0 (2020.0.55582.0)
public void PickObject(
	string prompt,
	Type[] typeFilter,
	out DrawingObject pickedObject,
	out ViewBase pickedView,
	out Point pickedPoint


Type: SystemString
The prompt shown in the status bar before the picks. See the class remarks for more information about prompts.
Type: SystemType
The types to pick. If null, any type is allowed.
Type: Tekla.Structures.DrawingDrawingObject
The picked drawing object.
Type: Tekla.Structures.DrawingViewBase
The view in which the pick occurred.
Type: Tekla.Structures.Geometry3dPoint
The picked point in the view coordinates.
Exception Condition
InvalidPluginPickerInputException Thrown when the picker is being used through a plug-in which has invalid PluginPickerInputs defined.
PickerInterruptedException Thrown when the user interrupts the picker before anything has been picked.
The list of types to pick may contain any object derived from DrawingObject or DrawingObject itself. For example, typeof(ModelObject) will allow picking of part, bolts, reinforcements, etc.
using Tekla.Structures.Drawing;
using System;

public class Example
       public void Example1()
           // Allow picking of model objects and rectangles.
           Type [] TypeFilter = new Type[] { typeof(ModelObject), typeof(Rectangle) };
using Tekla.Structures.Drawing;
using System;

public class Example
       public void Example1()
           // Allow picking of all kinds of dimensions.
           Type [] TypeFilter = new Type[] { typeof(DimensionBase) };
See Also