Operation.referenceTool Property

Parent Object: Operation

PreviewThis functionality is provided as a preview of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the Fusion API and Scripts forum.

Because this is a preview of future functionality, there is the possibility that it will change, which will possibly break any existing programs that use this functionality. Because of that, you should never deliver any programs that use any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.


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