Robot.Selected Property

Sets and gets the default robot number to be used when accessing a specific robot.

Robot.Selected = <robot_number>
-or-
... Robot.Selected

Prerequisites

None

Parameters

None

Remarks

This property allows a thread to set its default robot number.  Most of the properties and methods that reference a robot allow the robot number to be explicitly specified or to be unspecified and utilize the Selected robot number by default.  However, there are some methods, such as the location_object.Here, that always access the Selected robot. The Selected robot number is an Integer that ranges from 1 to N. When a robot is Attached, the system forces the Selected property to be equal to the Attached value.

Examples

Dim iRobot As Integer
Robot.Selected = 1 ' Robot #1 is now Selected
iRobot = Robot.Selected ' iRobot will be set to 1

See Also

Robot Class | Robot.Attached