Operation.referenceTool Property

Parent Object: Operation
Defined in namespace "adsk::cam" and the header file is <Cam/Operations/Operation.h>

Description

Get or set the tool for this operation. The document's tool library will be updated accordingly. The tool instance returned is a copy and therefore is not referenced by the operation. To change the reference tool of the operation, the new tool must be assigned to the operation, but once set it cannot be unset again. Setting the tool is only possible on operation strategies that support reference tools, an exception is thrown otherwise. Likewise null is returned if the operation strategy does not support reference tools.

Syntax

"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.referenceTool

# Set the value of the property.
operation_var.referenceTool = propertyValue
"operation_var" Is a variable referencing an Operation Object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<Tool> propertyValue = operation_var->referenceTool();

// Set the value of the property, where value_var is a Tool.
bool returnValue = operation_var->referenceTool(value_var);

Property Value

This is a read/write property whose value is a Tool.

Version

Introduced in version April 2026