# GetObject class

Namespace: [Rhino.Input.Custom](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.input.custom.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class GetObject : GetBaseClass
```

The GetObject class is the tool commands use to interactively select objects.

**Example:**

GetObject go = new GetObject(); go.GetObjects(1,0); if( go.CommandResult() != Command.Result.Success ) ... use canceled or some other type of input was provided int object_count = go.ObjectCount(); for( int i=0; i<object_count; i++ ) { ObjectReference objref = go.Object(i); ON_Geometry geo = objref.Geometry(); ... }

## Constructors

- [GetObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/ctor.md)

## Properties

- [AlreadySelectedObjectSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/alreadyselectedobjectselect.md): Allow selecting objects that are already selected. By default, GetObjects() disallows selection of objects that are already selected to avoid putting the same object in the selection set more than once. Calling EnableAlreadySelectedObjectSelect = true overrides that restriction and allows selected objects to be selected and returned by GetObjects. This is useful because, coupled with the return immediately mode of GetObjects(1, -1), it is possible to select a selected object to deselect when the selected objects are being managed outside GetObjects() as in the case of CRhinoPolyEdge::GetEdge().
- [BottomObjectPreference](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/bottomobjectpreference.md): By default, if a call to Input is permitted to select different parts of the same object, like a polysurface, a surface and an edge, then the top-most object is preferred. (polysurface beats face beats edge). If you want the bottom most object to be preferred, then call EnableBottomObjectPreference = true before calling GetObjects().
- [ChooseOneQuestion](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/chooseonequestion.md): By default, if a call to Input is permitted to select different parts of the same object, like a polysurface and an edge of that polysurface, then the top-most object is automatically selected. If you want the choose-one-object mechanism to include pop up in these cases, then call EnableChooseOneQuestion = true before calling GetObjects().
- [DeselectAllBeforePostSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/deselectallbeforepostselect.md): true if pre-selected input will be deselected before post-selection begins when no pre-selected input is valid.
- [GeometryAttributeFilter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/geometryattributefilter.md): The geometry attribute filter provides a secondary filter that can be used to restrict which objects can be selected. Control of the type of geometry (points, curves, surfaces, meshes, etc.) is provided by GetObject.SetGeometryFilter. The geometry attribute filter is used to require the selected geometry to have certain attributes (open, closed, etc.). The default attribute filter permits selection of all types of geometry.
- [GeometryFilter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/geometryfilter.md): The geometry type filter controls which types of geometry (points, curves, surfaces, meshes, etc.) can be selected. The default geometry type filter permits selection of all types of geometry. NOTE: the filter can be a bitwise combination of multiple ObjectTypes.
- [GroupSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/groupselect.md): By default, groups are ignored in GetObject. If you want your call to GetObjects() to select every object in a group that has any objects selected, then enable group selection.
- [InactiveDetailPickEnabled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/inactivedetailpickenabled.md): By default, objects in inactive details are not permitted to be picked. In a few rare cases this is used (ex. picking circles during DimRadius)
- [LockedObjectSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/lockedobjectselect.md): By default, locked objects cannot be selected. If you do want to be able to select locked objects, then call LockedObjectSelect=true.
- [ObjectCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/objectcount.md): Gets the number of objects that were selected.
- [ObjectsWerePreselected](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/objectswerepreselected.md)
- [OneByOnePostSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/onebyonepostselect.md): In one-by-one post selection, the user is forced to select objects by post picking them one at a time.
- [ProxyBrepFromSubD](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/proxybrepfromsubd.md): If a subd (or a subd component) cannot be selected, but a brep (or brep component) can be selected, then automatically create and use a proxy brep.
- [ReferenceObjectSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/referenceobjectselect.md): By default, reference objects can be selected. If you do not want to be able to select reference objects, then call EnableReferenceObjectSelect=false.
- [SerialNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/serialnumber.md): Each instance of GetObject has a unique runtime serial number that is used to identify object selection events associated with that instance.
- [SubObjectSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/subobjectselect.md): By default, GetObject.Input will permit a user to select sub-objects (like a curve in a b-rep or a curve in a group). If you only want the user to select "top" level objects, then call EnableSubObjectSelect = false.

## Methods

- [ActiveGetObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/activegetobject.md): (static) Get the currently running GetObject for a given document
- [AppendToPickList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/appendtopicklist.md)
- [ClearObjects](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/clearobjects.md): Clear possible special object drawing
- [CustomGeometryFilter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/customgeometryfilter.md): Checks geometry to see if it can be selected. Override to provide fancy filtering.
- [DisablePreSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/disablepreselect.md)
- [EnableClearObjectsOnEntry](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enableclearobjectsonentry.md): By default the picked object list is cleared when GetObject.GetObjects() is called. If you are reusing a GetObject class and do not want the existing object list cleared when you call Input, then call EnableClearObjectsOnEntry(false) before calling GetObjects().
- [EnableHighlight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enablehighlight.md): By default, any object post-pick selected by GetObjects() is highlighted. If you want to post-pick objects and not have them automatically highlight, then call EnableHighlight = false.
- [EnableIgnoreGrips](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enableignoregrips.md): By default, post selection will select objects with grips on. If you do not want to be able to post select objects with grips on, then call EnableIgnoreGrips = false. The ability to preselect an object with grips on is determined by the value returned by the virtual RhinoObject.IsSelectableWithGripsOn.
- [EnablePostSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enablepostselect.md): Control the availability of post selection in GetObjects.
- [EnablePreSelect](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enablepreselect.md): Control the pre-selection behavior GetObjects.
- [EnablePressEnterWhenDonePrompt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enablepressenterwhendoneprompt.md): By default, when GetObject.GetObjects is called with minimumNumber > 0 and maximumNumber = 0, the command prompt automatically includes "Press Enter when done" after the user has selected at least minimumNumber of objects. If you want to prohibit the addition of the "Press Enter when done", then call EnablePressEnterWhenDonePrompt = false;
- [EnableSelPrevious](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enableselprevious.md): By default, any object selected during a command becomes part of the "previous selection set" and can be reselected by the SelPrev command. If you need to select objects but do not want them to be selected by a subsequent call to SelPrev, then call EnableSelPrev = false.
- [EnableUnselectObjectsOnExit](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/enableunselectobjectsonexit.md): By default any objects in the object list are unselected when GetObject.GetObjects() exits with any return code besides Object. If you want to leave the objects selected when non-object input is returned, then call EnableUnselectObjectsOnExit(false) before calling GetObjects().
- [Get](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/get.md): Call to select a single object.
- [GetMultiple](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/getmultiple.md): Call to select objects.
- [Object](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/object.md)
- [Objects](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/objects.md)
- [PassesGeometryAttributeFilter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/passesgeometryattributefilter.md): Checks geometry to see if it passes the basic GeometryAttributeFilter.
- [SetCustomGeometryFilter](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/setcustomgeometryfilter.md): Set filter callback function that will be called by the CustomGeometryFilter
- [SetPressEnterWhenDonePrompt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getobject/setpressenterwhendoneprompt.md): The default prompt when EnablePressEnterWhenDonePrompt is enabled is "Press Enter when done". Use this function to specify a different string to be appended.

## Inherited Members

- From [GetBaseClass](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass.md): [AcceptColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptcolor.md), [AcceptCustomMessage](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptcustommessage.md), [AcceptEnterWhenDone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptenterwhendone.md), [AcceptNothing](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptnothing.md), [AcceptNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptnumber.md), [AcceptPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptpoint.md), [AcceptString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptstring.md), [AcceptUndo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/acceptundo.md), [AddOption](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoption.md), [AddOptionColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptioncolor.md), [AddOptionDouble](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptiondouble.md), [AddOptionEnumList<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptionenumlist.md), [AddOptionEnumSelectionList<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptionenumselectionlist.md), [AddOptionInteger](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptioninteger.md), [AddOptionList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptionlist.md), [AddOptionString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptionstring.md), [AddOptionToggle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/addoptiontoggle.md), [ClearCommandOptions](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/clearcommandoptions.md), [ClearDefault](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/cleardefault.md), [Color](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/color.md), [CommandResult](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/commandresult.md), [CustomMessage](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/custommessage.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/dispose.md), [EnableTransparentCommands](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/enabletransparentcommands.md), [GetSelectedEnumValue<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/getselectedenumvalue.md), [GetSelectedEnumValueFromSelectionList<T>](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/getselectedenumvaluefromselectionlist.md), [GotDefault](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/gotdefault.md), [Line2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/line2d.md), [Number](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/number.md), [Option](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/option.md), [OptionIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/optionindex.md), [PickRectangle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/pickrectangle.md), [Point](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/point.md), [Point2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/point2d.md), [Rectangle2d](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/rectangle2d.md), [Result](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/result.md), [SetCommandPrompt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setcommandprompt.md), [SetCommandPromptDefault](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setcommandpromptdefault.md), [SetDefaultColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setdefaultcolor.md), [SetDefaultInteger](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setdefaultinteger.md), [SetDefaultNumber](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setdefaultnumber.md), [SetDefaultPoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setdefaultpoint.md), [SetDefaultString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setdefaultstring.md), [SetOptionVaries](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setoptionvaries.md), [SetWaitDuration](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/setwaitduration.md), [StringResult](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/stringresult.md), [Vector](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/vector.md), [View](https://developer.rhino3d.com/api/rhinocommon/type/rhino.input.custom.getbaseclass/view.md)
