Picker Class

The Picker class can be used to query the user to do manual picks of objects and points from the Tekla Structures model. The methods throw an exception if the user interrupts (cancels) the pick command.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.UIPicker

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
[SerializableAttribute]
public sealed class Picker

The Picker type exposes the following members.

Constructors
  NameDescription
Public methodPicker
Creates a new picker instance.
Top
Methods
  NameDescription
Public methodPickFace
Queries the user to pick a face from the model.
Public methodPickFace(String)
Queries the user to pick a face from the model with the given prompt.
Public methodPickLine
Queries the user to pick a line from the model.
Public methodPickLine(String)
Queries the user to pick a line from the model with the given prompt.
Public methodPickObject(PickerPickObjectEnum)
Queries the user to pick one model object from the model.
Public methodPickObject(PickerPickObjectEnum, String)
Queries the user to pick one model object from the model with the given prompt.
Public methodPickObjects(PickerPickObjectsEnum)
Queries the user to pick model objects from the model.
Public methodPickObjects(PickerPickObjectsEnum, String)
Queries the user to pick model objects from the model with the given prompt.
Public methodPickPoint
Queries the user to pick a point from the model.
Public methodPickPoint(String)
Queries the user to pick a point from the model with the given prompt.
Public methodPickPoint(Point)
Queries the user to pick a point from the model with reference to the given point.
Public methodPickPoint(String, Point)
Queries the user to pick point with given prompt and reference to another point.
Public methodPickPoints(PickerPickPointEnum)
Queries the user to pick points from the model.
Public methodPickPoints(PickerPickPointEnum, String)
Queries the user to pick points from the model with the given prompt and reference to another point.
Top
Remarks
Prompts

Tekla Structures prefixes the given prompt with "prompt_" and looks for a translation in the prompts.ail file. If the translation (e.g. "prompt_Pick_first_position") is not found in the prompts.ail file, the prompt string is displayed as such. This feature can be used to give already translated strings to the picker.

Examples
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;

using System;
using System.Windows.Forms;

public class Example
{
       public void Example1()
       {
           Picker Picker = new Picker();
           Point p = null;
           try
           {
               p = Picker.PickPoint();
           }
           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