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: 2023.0.3
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
ExceptionCondition
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next