Prompts the user to pick or select one or more objects.
rhinoscriptsyntax.GetObjectsEx (message=None, filter=0, group=True, preselect=False, select=False, objects=None)
rhinoscript.selection.GetObjectsEx (message=None, filter=0, group=True, preselect=False, select=False, objects=None)
message |
Optional. String. A prompt or message. |
||||||||||||||||||||||||||||||||||||||
filter |
Optional. Number. The type(s) of geometry objects (points, curves, surfaces, meshes, etc.) that can be selected. Object types can be added together to filter several different kinds of geometry.
|
||||||||||||||||||||||||||||||||||||||
group |
Optional. Boolean. Honor object grouping. If omitted and the user picks a group, the entire group will be picked (True). Note, if filter is set to a value other than 0 (All objects), then group selection will be disabled. |
||||||||||||||||||||||||||||||||||||||
preselect |
Optional. Boolean. Allow for the selection of pre-selected objects. If omitted, pre-selected objects are not accepted (False). |
||||||||||||||||||||||||||||||||||||||
select |
Optional. Boolean. Specifies whether or not the picked objects will remain selected when the function ends. If omitted, objects that were pre-picked will remain selected and the objects that were post-picked will not be selected. |
||||||||||||||||||||||||||||||||||||||
objects |
Optional. List. A list of strings or Guids identifying the objects that are allowed to be selected. |
List |
A list that contains tuples of selection information if successful. The tuple of selection information will contain the following:
|
import rhinoscriptsyntax as rs
objects = rs.GetObjectsEx("Select objects", 0, True)
for obj in objects:
print "Object id = ", obj[0]
print "Object was preselected = ", obj[1]
if obj[2]==0:
print "Selection method = 0 (non-mouse)"
elif obj[2]==1:
print "Selection method = 1 (mouse)"
print "Pick point = ", obj[3]
elif obj[2]==2:
print "Selection method = 2 (window)"
elif obj[2]==3:
print "Selection method = 3 (crossing)"
print "Active view = ", obj[4]