Picker Class |
The Picker class is used to pick points and objects in the drawing.
Inheritance Hierarchy
Namespace: Tekla.Structures.Drawing.UI
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The Picker type exposes the following members.
Methods
Name | Description | |
---|---|---|
IsInteractive |
Indicates whether the picker is interactive and currently allowed to access the UI or not.
If not, then the plug-in should avoid making dialog calls or message boxes.
| |
PickObject(String) |
Requests the user to pick one object.
Returns the picked drawing object and the view in which the pick occurred.
| |
PickObject(String, DrawingObject, ViewBase) |
Requests the user to pick one object.
| |
PickObject(String, DrawingObject, ViewBase, Point) |
Requests the user to pick one object. Returns the picked point in addition to the picked object.
| |
PickObject(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.
| |
PickObjectAndPoint |
Requests the user to pick one object.
Returns the picked drawing object, the view in which the pick occurred and picked point in the view coordinates.
| |
PickPoint(String) |
Requests the user to pick one point.
Returns the picked point in the view coordinates and the view in which the pick occurred.
| |
PickPoint(String, Point, ViewBase) |
Requests the user to pick one point.
| |
PickPoints(StringList) |
Requests picks of points from the user. The sequence is terminated by the middle button pick.
Returns the picked points in the view coordinates and the view in which the pick occurred.
| |
PickPoints(Int32, StringList) |
Requests N picks of points from the user.
Returns the picked points in the view coordinates and the view in which the pick occurred.
| |
PickPoints(StringList, PointList, ViewBase) |
Requests picks of points from the user. The sequence is terminated by the middle button pick.
| |
PickPoints(Int32, StringList, PointList, ViewBase) |
Requests N picks of points from the user.
| |
PickThreePoints |
Requests a pick of three points from the user.
| |
PickTwoPoints |
Requests a pick of two points from the user.
|
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.
using Tekla.Structures.Drawing; using Tekla.Structures.Drawing.UI; using Tekla.Structures.Geometry3d; public class Example { public void Example1() { DrawingHandler drawingHandler = new DrawingHandler(); Picker picker = drawingHandler.GetPicker(); Point point = null; ViewBase view = null; string prompt = "Picke zwei Punkte um die Richtung vorzugeben"; picker.PickPoint(prompt, out point, out view); } }
Examples
using Tekla.Structures.Drawing; using Tekla.Structures.Drawing.UI; using Tekla.Structures.Geometry3d; public class Example { public void PickPointExample() { var drawingHandler = new DrawingHandler(); Picker picker = drawingHandler.GetPicker(); try { var pick = picker.PickPoint("Pick_point"); var point = pick.Item1; var view = pick.Item2; // Do something with the picked point and view. } catch(PickerInterruptedException) { // No pick happened } } }
See Also