PickInput Class

The PickInput class handles the input of picked objects and positions.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.UIPickInput

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public sealed class PickInput : ICollection, 
	IEnumerable

The PickInput type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in the ICollection.
Public propertyIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Top
Methods
  NameDescription
Public methodCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Public methodCode exampleGetEnumerator
Returns an enumerator that iterates through a collection.
Top
Examples
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();
        try
        {
            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;
                    MessageBox.Show(M.Identifier.ToString());
                }
                if (Item.GetInputType() == InputItem.InputTypeEnum.INPUT_POLYGON)
                {
                    ArrayList Points = Item.GetData() as ArrayList;
                    MessageBox.Show((Points[0] as TSG.Point).ToString());
                }
            }
        }
        catch (Exception e)
        {
            MessageBox.Show(e.ToString());
        }
    }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next