You're reading the documentation for an older, but still supported version (1.33.4).
For information on the latest version, please have a look at 1.33.5.

get_tool

This function returns the tool information currently set in the robot controller. If no tool is set, it returns an empty string.

Definition
DRFLEx.h within class CDRFLEx, public section

string get_tool() { return string(_get_tool(_rbtCtrl)); };

Parameter
None

Return

Value

Description

string

Name of the currently selected tool.
If no tool is active, returns an empty string “”.

Example

string strTool = drfl.get_tool();

// Check the currently mounted tool
if (strTool != "tool#1") {
    drfl.set_tool("tool#1");
}

This example checks the currently mounted tool name using get_tool(), and sets the active tool to “tool#1” if it is not already selected.