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. |
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.