Operations.createInput Method

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

Description

Creates a new OperationInput object, which is used to define the operation you want to create. Use properties and methods on the returned OperationInput object to define the desired operation and then pass it into the add method to create the operation.

Syntax

"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.createInput(strategy)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->createInput(strategy);

Return Value

Type Description
OperationInput Returns a new OperationInput object or will fail if an invalid strategy is specified.

Parameters

Name Type Description
strategy string The name of the strategy type that you want to create. Use the compatibleStrategies property of Operations object to get a list of the names of the strategies.

Samples

Name Description
Additive Manufacturing API Sample

Demonstrates how to automate the creation of an additive FFF manufacturing setup and generate a toolpath.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select an FFF 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, if required, based on the orientation of each component. Finally, the script generates and simulates the additive toolpath for the active setup.

Additive Manufacturing API Sample

Demonstrates how to automate the creation of an additive SLA manufacturing setup.

To run the sample script, have a design with one or more components open in Fusion’s DESIGN workspace. This script will switch the UI from the DESIGN workspace to the MANUFACTURE workspace, create a new Manufacturing Model, and create an Additive setup using that manufacturing model as an input.

The setup will select a SLA 3D printer from Fusion’s machine library and a print setting from the print setting library. All components in the Manufacturing model will be automatically oriented and arranged within the build area of the selected FFF machine. This script will also create support structures, based on the orientation of each component.

The support and orientation operations are created from a template. The script further demonstrates how to wrap script code into a command such that only one undo entry is created for the entire script instead of one entry per internal action.

Basic Milling Workflow Sample Demonstrates the creation of a basic milling workflow from script

Demonstrates creating a setup, searching tool library to retrieve a tool, create a couple of machining operations and a NC program, ready for post processing.

Use the 2D Strategies model from the Fusion CAM Samples folder as your CAD model.

Hole and Pocket Recognition API Sample

This sample script demonstrates three different methods for feature recognition: one for holes and two for pockets.

The script starts by creating a simple component which is then used to demonstrate the three methods. After the features are recognised they are coloured and milling and drilling operations are created for each feature.

RecognizedHoleGroup returns a list of BRepFaces that can be used as selections for the drilling operation. RecognizedPocket and PocketRecognitionSelection do not return BRepFaces, and their output needs additional processing before the output can be used for creating machining operations.

The sample script demonstrates a couple of different methods, including finding the pocket BRepFaces and creating sketches from the recognized pockets.

Manufacturing Workflow API Sample Manufacturing Workflow API Sample

This sample script starts by creating a simple component which is then used to describe a milling workflow. It creates a setup, a few operations, pick some tools from a Fusion sample tool library using loops and queries and ends up post-processing the operations out using an NC Program.

Wood Routing Workflow Sample This script demonstrates routing wood panels.

When running the sample, it assumes you have an open design containing one or more "panels" oriented flat in the X-Y plane. The script creates a setup and a 2D contour operation with tabs to route the panels from a standard sheet.

Version

Introduced in version April 2023