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

get_tool_shape

This function retrieves the currently active tool shape information that has been set in the robot controller. If no tool shape is currently active, an empty string is returned. This function is supported from M2.4 version or higher.

Definition
DRFLEx.h within class CDRFLEx, public section (line 905)

string get_tool_shape() {
    return _get_tool_shape(_rbtCtrl);
};

Parameter
None

Return

Value

Description

string

Name of the currently active tool shape.
Returns an empty string if no tool shape is selected.

Example

#include "DRFLEx.h"
using namespace DRAFramework;

int main() {
    CDRFLEx drfl;

    // Retrieve the name of the currently active tool shape
    string activeShape = drfl.get_tool_shape();

    if (activeShape.empty())
        printf("No tool shape is currently active.\n");
    else
        printf("Current tool shape: %s\n", activeShape.c_str());
}

This example checks the currently active tool shape in the controller and prints its name to the console. If no shape is active, it displays a corresponding message.