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.

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: 2018.1.0.0 (2018.1.0.0)
Syntax
public void PickObject(
	string prompt,
	Type[] typeFilter,
	out DrawingObject pickedObject,
	out ViewBase pickedView,
	out Point pickedPoint
)

Parameters

prompt
Type: SystemString
The prompt shown in the status bar before the picks. See the class remarks for more information about prompts.
typeFilter
Type: SystemType
The types to pick. If null, any type is allowed.
pickedObject
Type: Tekla.Structures.DrawingDrawingObject
The picked drawing object.
pickedView
Type: Tekla.Structures.DrawingViewBase
The view in which the pick occurred.
pickedPoint
Type: Tekla.Structures.Geometry3dPoint
The picked point in the view coordinates.
Exceptions
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.
Remarks
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