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.

PickInput Class

The PickInput class handles the input of picked objects and positions.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2020.0.0.0 (2020.0.55582.0)
public sealed class PickInput : ICollection, 

The PickInput type exposes the following members.

  Name Description
Public property Count
Gets the number of elements contained in the ICollection.
Public property IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Public property SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
  Name Description
Public method CopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Public methodCode example GetEnumerator
Returns an enumerator that iterates through a collection.
The following example asks the user to pick a face and then shows the input for the plug-in:
using Tekla.Structures.Model;
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;
using TSG = Tekla.Structures.Geometry3d;

using System;
using System.Collections;
using System.Windows.Forms;

public class Example
    public void Example1()
        Picker Picker = new Picker();
            PickInput Input = Picker.PickFace("");
            IEnumerator MyEnum = Input.GetEnumerator();
            while (MyEnum.MoveNext())
                InputItem Item = MyEnum.Current as InputItem;
                if (Item.GetInputType() == InputItem.InputTypeEnum.INPUT_1_OBJECT)
                    ModelObject M = Item.GetData() as ModelObject;
                if (Item.GetInputType() == InputItem.InputTypeEnum.INPUT_POLYGON)
                    ArrayList Points = Item.GetData() as ArrayList;
                    MessageBox.Show((Points[0] as TSG.Point).ToString());
        catch (Exception e)
See Also