public class GetObject : GetBaseClass
The GetObject class is the tool commands use to interactively select objects.
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

#ExampleSince v5.0
public GetObject()

Properties

AlreadySelectedObjectSelect

#Since v5.0
public bool AlreadySelectedObjectSelect { get; set; }
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

#Since v5.0
public bool BottomObjectPreference { get; set; }
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

#Since v5.0
public bool ChooseOneQuestion { get; set; }
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

#ExampleSince v5.0
public bool DeselectAllBeforePostSelect { get; set; }
true if pre-selected input will be deselected before post-selection begins when no pre-selected input is valid.

GeometryAttributeFilter

#ExampleSince v5.0
[CLSCompliant(false)] public GeometryAttributeFilter GeometryAttributeFilter { get; set; }
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

#ExampleSince v5.0
[CLSCompliant(false)] public ObjectType GeometryFilter { get; set; }
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

#ExampleSince v5.0
public bool GroupSelect { get; set; }
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

#Since v5.8
public bool InactiveDetailPickEnabled { get; set; }
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

#Since v9.0
public bool LockedObjectSelect { get; set; }
By default, locked objects cannot be selected. If you do want to be able to select locked objects, then call LockedObjectSelect=true.

ObjectCount

#Since v5.0
public int ObjectCount { get; }
Gets the number of objects that were selected.

ObjectsWerePreselected

#Since v5.0
public bool ObjectsWerePreselected { get; }

OneByOnePostSelect

#ExampleSince v5.0
public bool OneByOnePostSelect { get; set; }
In one-by-one post selection, the user is forced to select objects by post picking them one at a time.

ProxyBrepFromSubD

#Since v7.0
public bool ProxyBrepFromSubD { get; set; }
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

#ExampleSince v5.0
public bool ReferenceObjectSelect { get; set; }
By default, reference objects can be selected. If you do not want to be able to select reference objects, then call EnableReferenceObjectSelect=false.

SerialNumber

#Since v5.0
[CLSCompliant(false)] public uint SerialNumber { get; }
Each instance of GetObject has a unique runtime serial number that is used to identify object selection events associated with that instance.

SubObjectSelect

#ExampleSince v5.0
public bool SubObjectSelect { get; set; }
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

AcceptColor

public void AcceptColor(bool enable)
If you want to allow the user to be able to type in a color r,g,b or name during GetPoint.Get(), GetObject::GetObjects(), etc., then call AcceptColor(true) before calling GetPoint()/GetObject(). If the user chooses to type in a color, then the result code GetResult.Color is returned and you can use RhinoGet.Color() to get the value of the color. If the get accepts points, then the user will not be able to type in r,g,b colors but will be able to type color names.
inherited fromGetBaseClass
enable (bool)true if user is able to type a color.

AcceptCustomMessage

public void AcceptCustomMessage(bool enable)
inherited fromGetBaseClass
enable (bool)

AcceptEnterWhenDone

public void AcceptEnterWhenDone(bool enable)
There are instances of RhinoGet that prompt with "Press Enter when Done." yet do not call AcceptNothing(). On the Mac, these instances need an additional call to AcceptEnterWhenDone() so the GetPointOptions dialog can correctly enable the Done button.
inherited fromGetBaseClass
enable (bool)

AcceptNothing

public void AcceptNothing(bool enable)
If you want to allow the user to be able to press enter in order to skip selecting a something in GetPoint.Get(), GetObject::GetObjects(), etc., then call AcceptNothing( true ) beforehand.
inherited fromGetBaseClass
enable (bool)true if user is able to press enter in order to skip selecting.

AcceptNumber

public void AcceptNumber(bool enable, bool acceptZero)
If you want to allow the user to be able to type in a number during GetPoint.Get(), GetObject::GetObjects(), etc., then call AcceptNumber() beforehand. If the user chooses to type in a number, then the result code GetResult.Number is returned and you can use RhinoGet.Number() to get the value of the number. If you are using GetPoint and you want "0" to return (0,0,0) instead of the number zero, then set acceptZero = false.
inherited fromGetBaseClass
enable (bool)true if user is able to type a number.
acceptZero (bool)If you are using GetPoint and you want "0" to return (0,0,0) instead of the number zero, then set acceptZero = false.

AcceptPoint

public void AcceptPoint(bool enable)
If you want to allow the user to be able to type in a point then call AcceptPoint(true) before calling GetPoint()/GetObject(). If the user chooses to type in a number, then the result code GetResult.Point is returned and you can use RhinoGet.Point() to get the value of the point.
inherited fromGetBaseClass
enable (bool)true if user is able to type in a point.

AcceptString

public void AcceptString(bool enable)
If you want to allow the user to be able to type in a string during GetPoint.Get(), GetObject::GetObjects(), etc., then call AcceptString(true) before calling GetPoint()/GetObject(). If the user chooses to type in a string, then the result code GetResult.String is returned and you can use RhinoGet.String() to get the value of the string.
inherited fromGetBaseClass
enable (bool)true if user is able to type a string.

AcceptUndo

public void AcceptUndo(bool enable)
If you want to allow the user to have an 'undo' option in GetPoint.Get(), GetObject.GetObjects(), etc., then call AcceptUndo(true) beforehand.
inherited fromGetBaseClass
enable (bool)true if user is able to choose the 'Undo' option.

ActiveGetObject

#Since v6.3
public static GetObject ActiveGetObject(RhinoDoc doc)
Get the currently running GetObject for a given document
doc (RhinoDoc)

AddOption

public int AddOption(LocalizeStringPair optionName, LocalizeStringPair optionValue, bool hiddenOption)
Adds a command line option.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
optionValue (LocalizeStringPair)The localized value visualized after an equality sign.
hiddenOption (bool)If true, the option is not displayed on the command line and the full option name must be typed in order to activate the option.
option index value (>0) or 0 if option cannot be added.

AddOption

public int AddOption(LocalizeStringPair optionName, LocalizeStringPair optionValue)
Adds a command line option.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
optionValue (LocalizeStringPair)The localized value visualized after an equality sign.
option index value (>0) or 0 if option cannot be added.

AddOption

public int AddOption(LocalizeStringPair optionName)
Adds a command line option.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
option index value (>0) or 0 if option cannot be added.

AddOption

public int AddOption(string englishOption, string englishOptionValue, bool hiddenOption)
Adds a command line option.
inherited fromGetBaseClass
englishOption (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
englishOptionValue (string)The option value in English, visualized after an equality sign.
hiddenOption (bool)If true, the option is not displayed on the command line and the full option name must be typed in order to activate the option.
Option index value (>0) or 0 if option cannot be added.

AddOption

public int AddOption(string englishOption, string englishOptionValue)
Adds a command line option.
inherited fromGetBaseClass
englishOption (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
englishOptionValue (string)The option value in English, visualized after an equality sign.
Option index value (>0) or 0 if option cannot be added.

AddOption

public int AddOption(string englishOption)
Adds a command line option.
inherited fromGetBaseClass
englishOption (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes).
option index value (>0) or 0 if option cannot be added.

AddOptionColor

public int AddOptionColor(LocalizeStringPair optionName, ref OptionColor colorValue, string prompt)
Add a command line option to get colors and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)option description.
colorValue (ref OptionColor)The current color value.
prompt (string)option prompt shown if the user selects this option
option index value (>0) or 0 if option cannot be added.

AddOptionColor

public int AddOptionColor(LocalizeStringPair optionName, ref OptionColor colorValue)
Add a command line option to get colors and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)option description
colorValue (ref OptionColor)The current color value.
option index value (>0) or 0 if option cannot be added.

AddOptionColor

public int AddOptionColor(string englishName, ref OptionColor colorValue, string prompt)
Add a command line option to get colors and automatically save the value.
inherited fromGetBaseClass
englishName (string)option description
colorValue (ref OptionColor)The current color value.
prompt (string)The command prompt will show this during picking.
option index value (>0) or 0 if option cannot be added.

AddOptionColor

public int AddOptionColor(string englishName, ref OptionColor colorValue)
Add a command line option to get colors and automatically save the value.
inherited fromGetBaseClass
englishName (string)option description
colorValue (ref OptionColor)The current color value.
option index value (>0) or 0 if option cannot be added.

AddOptionDouble

public int AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue, string prompt)
Adds a command line option to get numbers and automatically saves the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
numberValue (ref OptionDouble)The current number value.
prompt (string)option prompt shown if the user selects this option. If null or empty, then the option name is used as the get number prompt.
option index value (>0) or 0 if option cannot be added.

AddOptionDouble

public int AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)
Adds a command line option to get numbers and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
numberValue (ref OptionDouble)The current number value.
option index value (>0) or 0 if option cannot be added.

AddOptionDouble

public int AddOptionDouble(string englishName, ref OptionDouble numberValue, string prompt)
Adds a command line option to get numbers and automatically save the value.
inherited fromGetBaseClass
englishName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
numberValue (ref OptionDouble)Current value.
prompt (string)option prompt shown if the user selects this option. If null or empty, then the option name is used as the get number prompt.
option index value (>0) or 0 if option cannot be added.

AddOptionDouble

public int AddOptionDouble(string englishName, ref OptionDouble numberValue)
Adds a command line option to get numbers and automatically save the value.
inherited fromGetBaseClass
englishName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
numberValue (ref OptionDouble)The current number value.
Option index value (>0) or 0 if option cannot be added.

AddOptionEnumList<T>

[CLSCompliant(false)] public int AddOptionEnumList<T>(LocalizeStringPair optionName, T defaultValue, T[] include)
Adds a choice of enumerated values as list option. Allows to include only some enumerated values.
inherited fromGetBaseClass
optionName (LocalizeStringPair)The name of the option
defaultValue (T)The default value
include (T[])An array of enumerated values to use. This argument can also be null; in this case, the whole enumerated is used.
Option index
ArgumentExceptionGets thrown if defaultValue provided is not an enumerated type.

AddOptionEnumList<T>

[CLSCompliant(false)] public int AddOptionEnumList<T>(LocalizeStringPair optionName, T defaultValue)
Adds a choice of enumerated values as list option
inherited fromGetBaseClass
optionName (LocalizeStringPair)The name of the option
defaultValue (T)The default value
Option index
ArgumentExceptionGets thrown if defaultValue provided is not an enumerated type.

AddOptionEnumList<T>

[CLSCompliant(false)] public int AddOptionEnumList<T>(string englishOptionName, T defaultValue, T[] include)
Adds a choice of enumerated values as list option. Allows to include only some enumerated values.
inherited fromGetBaseClass
englishOptionName (string)The name of the option
defaultValue (T)The default value
include (T[])An array of enumerated values to use. This argument can also be null; in this case, the whole enumerated is used.
Option index
ArgumentExceptionGets thrown if defaultValue provided is not an enumerated type.

AddOptionEnumList<T>

[CLSCompliant(false)] public int AddOptionEnumList<T>(string englishOptionName, T defaultValue)
Adds a choice of enumerated values as list option
inherited fromGetBaseClass
englishOptionName (string)The name of the option
defaultValue (T)The default value
Option index
ArgumentExceptionGets thrown if defaultValue provided is not an enumerated type.

AddOptionEnumSelectionList<T>

[CLSCompliant(false)] public int AddOptionEnumSelectionList<T>(LocalizeStringPair optionName, IEnumerable<T> enumSelection, int listCurrentIndex)
Adds a list of enumerated values as option list. Use enumSelection[go.Option.CurrentListOptionIndex] to retrieve selection.
inherited fromGetBaseClass
optionName (LocalizeStringPair)The name of the option
enumSelection (IEnumerable<T>)The enumerated values to use.
listCurrentIndex (int)Zero based index of current option.
Option index

AddOptionEnumSelectionList<T>

[CLSCompliant(false)] public int AddOptionEnumSelectionList<T>(string englishOptionName, IEnumerable<T> enumSelection, int listCurrentIndex)
Adds a list of enumerated values as option list. Use enumSelection[go.Option.CurrentListOptionIndex] to retrieve selection.
inherited fromGetBaseClass
englishOptionName (string)
enumSelection (IEnumerable<T>)
listCurrentIndex (int)

AddOptionInteger

public int AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue, string prompt)
Adds a command line option to get integers and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
intValue (ref OptionInteger)The current integer value.
prompt (string)option prompt shown if the user selects this option. If null or empty, then the option name is used as the get number prompt.
option index value (>0) or 0 if option cannot be added.

AddOptionInteger

public int AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)
Adds a command line option to get integers and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
intValue (ref OptionInteger)The current integer value.
option index value (>0) or 0 if option cannot be added.

AddOptionInteger

public int AddOptionInteger(string englishName, ref OptionInteger intValue, string prompt)
Adds a command line option to get integers and automatically save the value.
inherited fromGetBaseClass
englishName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
intValue (ref OptionInteger)The current integer value.
prompt (string)option prompt shown if the user selects this option. If null or empty, then the option name is used as the get number prompt.
option index value (>0) or 0 if option cannot be added.

AddOptionInteger

public int AddOptionInteger(string englishName, ref OptionInteger intValue)
Adds a command line option to get integers and automatically save the value.
inherited fromGetBaseClass
englishName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
intValue (ref OptionInteger)The current integer value.
option index value (>0) or 0 if option cannot be added.

AddOptionList

public int AddOptionList(LocalizeStringPair optionName, IEnumerable<LocalizeStringPair> listValues, int listCurrentIndex)
Adds a command line list option.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
listValues (IEnumerable<LocalizeStringPair>)The string values.
listCurrentIndex (int)Zero based index of current option.
option index value (>0) or 0 if option cannot be added.

AddOptionList

public int AddOptionList(string englishOptionName, IEnumerable<string> listValues, int listCurrentIndex)
Adds a command line list option.
inherited fromGetBaseClass
englishOptionName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
listValues (IEnumerable<string>)The string values.
listCurrentIndex (int)Zero based index of current option.
option index value (>0) or 0 if option cannot be added.

AddOptionString

public int AddOptionString(LocalizeStringPair optionName, ref OptionString stringValue, string prompt)
Add a command line option to get a string and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)The option description.
stringValue (ref OptionString)The current string value.
prompt (string)Command prompt to be shown if the picks this option.
The option index value (>0) or 0 if option cannot be added.

AddOptionString

public int AddOptionString(LocalizeStringPair optionName, ref OptionString stringValue)
Add a command line option to get a string and automatically save the value.
inherited fromGetBaseClass
optionName (LocalizeStringPair)The option description.
stringValue (ref OptionString)The current string value.
The option index value (>0) or 0 if option cannot be added.

AddOptionString

public int AddOptionString(string englishName, ref OptionString stringValue, string prompt)
Add a command line option to get a string and automatically save the value.
inherited fromGetBaseClass
englishName (string)The option description.
stringValue (ref OptionString)The current string value.
prompt (string)Command prompt to be shown if the picks this option.
The option index value (>0) or 0 if option cannot be added.

AddOptionString

public int AddOptionString(string englishName, ref OptionString stringValue)
Add a command line option to get a string and automatically save the value.
inherited fromGetBaseClass
englishName (string)The option description.
stringValue (ref OptionString)The current string value.
The option index value (>0) or 0 if option cannot be added.

AddOptionToggle

public int AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)
Adds a command line option to toggle a setting.
inherited fromGetBaseClass
optionName (LocalizeStringPair)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
toggleValue (ref OptionToggle)The current toggle value.
option index value (>0) or 0 if option cannot be added.

AddOptionToggle

public int AddOptionToggle(string englishName, ref OptionToggle toggleValue)
Adds a command line option to toggle a setting.
inherited fromGetBaseClass
englishName (string)Must only consist of letters and numbers (no characters list periods, spaces, or dashes)
toggleValue (ref OptionToggle)The current toggle value.
option index value (>0) or 0 if option cannot be added.

AppendToPickList

#Since v6.3
public void AppendToPickList(ObjRef objref)
objref (ObjRef)

ClearCommandOptions

public void ClearCommandOptions()
Clear all command options.
inherited fromGetBaseClass

ClearDefault

public void ClearDefault()
Clears any defaults set using SetDefaultPoint, SetDefaultNumber, SetDefaultString, or SetCommandPromptDefault.
inherited fromGetBaseClass

ClearObjects

#Since v6.12
public void ClearObjects()
Clear possible special object drawing

Color

public Color Color()
Gets a color if Get*() returns GetResult.Color.
inherited fromGetBaseClass
The color chosen by the user.

CommandResult

public Result CommandResult()
Helper method for getting command result value from getter results.
inherited fromGetBaseClass
The converted command result.

CustomGeometryFilter

#Since v5.0
public virtual bool CustomGeometryFilter(RhinoObject rhObject, GeometryBase geometry, ComponentIndex componentIndex)
Checks geometry to see if it can be selected. Override to provide fancy filtering.
Remarks: The delegate should not throw exceptions. If an exception is thrown, a message box will show and the filter will be disabled.
rhObject (RhinoObject)parent object being considered.
geometry (GeometryBase)geometry being considered.
componentIndex (ComponentIndex)if >= 0, geometry is a proper sub-part of object->Geometry() with componentIndex.
The default returns true unless you've set a custom geometry filter. If a custom filter has been set, that delegate is called.

CustomMessage

public object CustomMessage()
inherited fromGetBaseClass

DisablePreSelect

#Since v5.0
public void DisablePreSelect()

Dispose

public void Dispose()
inherited fromGetBaseClass

Dispose

protected virtual void Dispose(bool disposing)
inherited fromGetBaseClass
disposing (bool)

EnableClearObjectsOnEntry

#Since v5.0
public void EnableClearObjectsOnEntry(bool enable)
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().
enable (bool)The state to set.

EnableHighlight

#Since v5.0
public void EnableHighlight(bool enable)
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.
enable (bool)

EnableIgnoreGrips

#Since v5.0
public void EnableIgnoreGrips(bool enable)
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.
enable (bool)

EnablePostSelect

#Since v5.0
public void EnablePostSelect(bool enable)
Control the availability of post selection in GetObjects.
Remarks: By default, if no valid input is pre-selected when GetObjects is called, then the user is given the chance to post select. If you want to force the user to pre-select, then call EnablePostSelect(false).
enable (bool)

EnablePreSelect

#Since v5.0
public void EnablePreSelect(bool enable, bool ignoreUnacceptablePreselectedObjects)
Control the pre-selection behavior GetObjects.
Remarks: By default, if valid input is pre-selected when GetObjects() is called, then that input is returned and the user is not given the opportunity to post-select. If you want to force the user to post-select, then call EnablePreSelect(false).
enable (bool)if true, pre-selection is enabled.
ignoreUnacceptablePreselectedObjects (bool)If true and some acceptable objects are pre-selected, then any unacceptable pre-selected objects are ignored. If false and any unacceptable are pre-selected, then the user is forced to post-select.

EnablePressEnterWhenDonePrompt

#Since v5.0
public void EnablePressEnterWhenDonePrompt(bool enable)
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;
enable (bool)

EnableSelPrevious

#Since v5.0
public void EnableSelPrevious(bool enable)
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.
enable (bool)

EnableTransparentCommands

public void EnableTransparentCommands(bool enable)
Control the availability of transparent commands during the get.
inherited fromGetBaseClass
Remarks: Some Rhino commands are "transparent" and can be run inside of other commands. Examples of transparent commands include the view manipulation commands like ZoomExtents, Top, etc., and the selection commands like SelAll, SelPoint, etc. By default transparent commands can be run during any get. If you want to disable this feature, then call EnableTransparentCommands(false) before calling GetString, GetPoint, GetObject, etc.
enable (bool)If true, then transparent commands can be run during the get. If false, then transparent commands cannot be run during the get.

EnableUnselectObjectsOnExit

#Since v5.0
public void EnableUnselectObjectsOnExit(bool enable)
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().
enable (bool)The state to set.

Get

#Since v5.0
[CLSCompliant(false)] public GetResult Get()
Call to select a single object.
GetResult.Object if an object was selected. GetResult.Cancel if the user pressed ESCAPE to cancel the selection. See GetResults for other possible values that may be returned when options, numbers, etc., are acceptable responses.

GetMultiple

#ExampleSince v5.0
[CLSCompliant(false)] public GetResult GetMultiple(int minimumNumber, int maximumNumber)
Call to select objects.
minimumNumber (int)minimum number of objects to select.
maximumNumber (int)maximum number of objects to select. If 0, then the user must press enter to finish object selection. If -1, then object selection stops as soon as there are at least minimumNumber of object selected. If >0, then the picking stops when there are maximumNumber objects. If a window pick, crossing pick, or Sel* command attempts to add more than maximumNumber, then the attempt is ignored.
GetResult.Object if one or more objects were selected. GetResult.Cancel if the user pressed ESCAPE to cancel the selection. See GetResults for other possible values that may be returned when options, numbers, etc., are acceptable responses.

GetSelectedEnumValue<T>

[CLSCompliant(false)] public T GetSelectedEnumValue<T>()
Returns the selected enumerated value. Use this in combination with GetBaseClass.AddOptionEnumList<T>(string, T).

This must be called directly after having called a Get method, and having obtained a GetResult.Option value.

inherited fromGetBaseClass
ArgumentExceptionGets thrown if type T is not an enumerated type.
IndexOutOfRangeExceptionIf 0 >= CurrentListOptionIndex or CurrentListOptionIndex > N where N is the number of enumerated values.

GetSelectedEnumValueFromSelectionList<T>

[CLSCompliant(false)] public T GetSelectedEnumValueFromSelectionList<T>(IEnumerable<T> selectionList)
Returns the selected enumerated value by looking at the list of values from which to select. Use this in combination with AddOptionEnumSelectionList.
inherited fromGetBaseClass
selectionList (IEnumerable<T>)
ArgumentExceptionGets thrown if type T is not an enumerated type.
IndexOutOfRangeExceptionIf 0 >= CurrentListOptionIndex or CurrentListOptionIndex > N where N is the number of enumerated values.

GotDefault

public bool GotDefault()
Returns true if user pressed Enter to accept a default point, number, or string set using SetDefaultPoint, SetDefaultNumber, or SetDefaultString.
inherited fromGetBaseClass
true if the result if the default point, number or string set. Otherwise, false.

Line2d

public Point[] Line2d()
Returns two points defining the location in the view window of the 2d line selected in GetPoint::Get2dLine().

(0,0) = upper left corner of window.

inherited fromGetBaseClass
An array with two 2D points.

Number

public double Number()
Gets a number if GetPoint.Get(), GetObject.GetObjects(), etc., returns GetResult.Number.
inherited fromGetBaseClass
The number chosen by the user.

Object

#ExampleSince v5.0
public ObjRef Object(int index)
index (int)

Objects

#Since v5.0
public ObjRef[] Objects()

OptionIndex

public int OptionIndex()
inherited fromGetBaseClass

PassesGeometryAttributeFilter

#Since v5.0
public bool PassesGeometryAttributeFilter(RhinoObject rhObject, GeometryBase geometry, ComponentIndex componentIndex)
Checks geometry to see if it passes the basic GeometryAttributeFilter.
rhObject (RhinoObject)parent object being considered.
geometry (GeometryBase)geometry being considered.
componentIndex (ComponentIndex)if >= 0, geometry is a proper sub-part of object->Geometry() with componentIndex.
true if the geometry passes the filter returned by GeometryAttributeFilter().

PickRectangle

public Rectangle PickRectangle()
If the get was a GetObjects() and the mouse was used to select the objects, then the returned rectangle has left < right and top < bottom. This rectangle is the Windows GDI screen coordinates of the picking rectangle. RhinoViewport.GetPickXform( pick_rect, pick_xform ) will calculate the picking transformation that was used. In all other cases, left=right=top=bottom=0;
inherited fromGetBaseClass
The picking rectangle; or 0 in the specified cases.

Point

public Point3d Point()
Gets a point if Get*() returns GetResult.Point.
inherited fromGetBaseClass
The point chosen by the user.

Point2d

public Point Point2d()
Returns location in view of point in selected in GetPoint::Get() or GetPoint::Get2dPoint(). (0,0) = upper left corner of window.
inherited fromGetBaseClass
The location.

Rectangle2d

public Rectangle Rectangle2d()
Returns the location in the view of the 2d rectangle selected in GetPoint::Get2dRectangle(). rect.left < rect.right and rect.top < rect.bottom (0,0) = upper left corner of window.
inherited fromGetBaseClass
The rectangle.

Result

[CLSCompliant(false)] public GetResult Result()
Returns result of the Get*() call.
inherited fromGetBaseClass
The result of the last Get*() call.

SetCommandPrompt

public void SetCommandPrompt(string prompt)
Sets prompt message that appears in the command prompt window.
inherited fromGetBaseClass
prompt (string)command prompt message.

SetCommandPromptDefault

public void SetCommandPromptDefault(string defaultValue)
Sets message that describes what default value will be used if the user presses enter. This description appears in angle brackets <> in the command prompt window. You do not need to provide a default value description unless you explicitly enable AcceptNothing.
inherited fromGetBaseClass
Remarks: If you have a simple default point, number, or string, it is easier to use SetDefaultPoint, SetDefaultNumber, or SetDefaultString. SetCommandPromptDefault and AcceptNothing can be used for providing more advanced UI behavior.
defaultValue (string)description of default value.
ON_3dPoint default_center = new ON_3dPoint(2,3,4); GetPoint gp = new GetPoint(); gp.SetCommandPrompt( "Center point" ); gp.SetCommandPromptDefault( "(2,3,4)" ); gp.AcceptNothing(true); gp.GetPoint(); if ( gp.Result() == GetResult.Nothing ) point = default_center;

SetCustomGeometryFilter

#ExampleSince v5.0
public void SetCustomGeometryFilter(GetObjectGeometryFilter filter)
Set filter callback function that will be called by the CustomGeometryFilter
filter (GetObjectGeometryFilter)

SetDefaultColor

public void SetDefaultColor(Color defaultColor)
Sets a color as default value that will be returned if the user presses ENTER key during the get.
inherited fromGetBaseClass
Remarks: Calling SetDefaultColor will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default color, GetResult.Color is returned and RhinoGet.GotDefault() will return true. Calling SetDefaultColor will clear any previous calls to SetDefaultString or SetDefaultPoint.
defaultColor (Color)value for default color.

SetDefaultInteger

public void SetDefaultInteger(int defaultValue)
Sets a number as default value that will be returned if the user presses ENTER key during the get.
inherited fromGetBaseClass
Remarks: Calling SetDefaultInteger will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default integer, GetResult.Number is returned and CRhinoGet.GotDefault() will return true. Calling SetDefaultNumber will clear any previous calls to SetDefaultString or SetDefaultPoint.
defaultValue (int)value for default number.

SetDefaultNumber

public void SetDefaultNumber(double defaultNumber)
Sets a number as default value that will be returned if the user presses ENTER key during the get.
inherited fromGetBaseClass
Remarks: Calling SetDefaultNumber will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default number, GetResult.Number is returned and RhinoGet.GotDefault() will return true. Calling SetDefaultNumber will clear any previous calls to SetDefaultString or SetDefaultPoint.
defaultNumber (double)value for default number.

SetDefaultPoint

public void SetDefaultPoint(Point3d point)
Sets a point as default value that will be returned if the user presses the ENTER key during the get.
inherited fromGetBaseClass
Remarks: Calling SetDefaultPoint will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses enter to accept the default point, GetResult.Point is returned and RhinoGet.GotDefault() will return true. Calling SetDefaultPoint will clear any previous calls to SetDefaultString or SetDefaultNumber.
point (Point3d)value for default point.

SetDefaultString

public void SetDefaultString(string defaultValue)
Sets a string as default value that will be returned if the user presses ENTER key during the get.
inherited fromGetBaseClass
Remarks: Calling SetDefaultString will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default string, GetResult.String is returned and RhinoGet.GotDefault() will return true. Calling SetDefaultString will clear any previous calls to SetDefaultNumber or SetDefaultPoint.
defaultValue (string)value for default string.

SetOptionVaries

public void SetOptionVaries(int optionIndex, bool varies)
Sets a command line option value to print "Varies" instead of the regular value.
inherited fromGetBaseClass
optionIndex (int)The option index.
varies (bool)True to print "Varies", false to print the option's current value.

SetPressEnterWhenDonePrompt

#Since v5.0
public void SetPressEnterWhenDonePrompt(string prompt)
The default prompt when EnablePressEnterWhenDonePrompt is enabled is "Press Enter when done". Use this function to specify a different string to be appended.
prompt (string)The text that will be displayed just after the prompt, after the selection has been made.

SetWaitDuration

public void SetWaitDuration(int milliseconds)
Sets the wait duration (in milliseconds) of the getter. If the duration passes without the user making a decision, the GetResult.Timeout code is returned.
inherited fromGetBaseClass
milliseconds (int)Number of milliseconds to wait.

StringResult

public string StringResult()
Gets a string if GetPoint.Get(), GetObject.GetObjects(), etc., returns GetResult.String.
inherited fromGetBaseClass
The string chosen by the user.

Vector

public Vector3d Vector()
Gets a direction if Get*() returns GetResult.Point (Set by some digitizers, but in general it's (0,0,0).
inherited fromGetBaseClass
The vector chosen by the user.

View

public RhinoView View()
Gets a view the user clicked in during GetPoint.Get(), GetObject.GetObjects(), etc.
inherited fromGetBaseClass
The view chosen by the user.