Hi @anthony.a.douglas .
After slightly modifying this sample, I was able to create a setup.
http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-AEF0708D-B657-4E9F-9032-4535E0D1C417
#Fusion360API Python script
import adsk.core, adsk.cam, os, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
doc = app.activeDocument
products = doc.products
# Get the CAM product
cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
# List of all setups
setups = cam.setups
# Specify the full filename of the template.
templateFilename = 'c:\\tmp\\face.f3dhsm-template'
# Check if the template exists (from the path specified above). Show an error if it doesn't exist.
if not os.path.exists(templateFilename):
ui.messageBox("The template '" + templateFilename + "' does not exist")
return
# Create CAM Setup
txtCmds = [
u'Commands.Start IronSetup',
u'NuCommands.CommitCmd'
]
[app.executeTextCommand(cmd) for cmd in txtCmds]
# setup = setups[-1] #ver2.0.9305 NG
setup = setups[setups.count -1]
# Add the template
results = setup.createFromTemplate(templateFilename)
operation = results.item(0)
operation.name = "API added operation"
cam.generateAllToolpaths(True)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Toolpath operation seems to only allow you to insert templates.
I think the cause is that the API does not provide a way to access the tool library.