Where can i find all query-criteria names and values for working with the tool library ?

maurizio_manzi
Advocate

Where can i find all query-criteria names and values for working with the tool library ?

maurizio_manzi
Advocate
Advocate

Hello,

where can i find all query-criteria names and values ?
In the API help I found a few examples, so for the tool_description

(Fusion 360 Help | Introduction to CAM Libraries | Autodesk😞

query.criteria.add('tool_description', adsk.core.ValueInput.createByString('1/16" Ball Endmill'))

 But I can't find a list of all query-criterias for the tool.
In particular, to define the type of tool you are looking for (Ball EndMill, endmill, ...).

 

Best regards

Maurizio

 

0 Likes
Reply
Accepted solutions (1)
379 Views
3 Replies
Replies (3)

BrianEkins
Mentor
Mentor
Accepted solution

The names are the names of the CAM Parameters associated with the tool. You can get the list by using the code below. Before you do that, you need to have the MANUFACTURE workspace active and have a tool in the document.  Have the TEXT COMMANDS window visible and ensure the lower-right settings are set to "Py". Enter each line and press return. You can also create a new script and put this code in there.

app=adsk.core.Application.get() 
cam=app.activeProduct
tool = cam.documentToolLibrary[0]
[t.name for t in tool.parameters]

 

When I run it, I get the result shown below in the TEXT COMMANDS window, where it has created a list of the names of all of the parameters.

[t.name for t in tool.parameters] 
['advancedMode', 'betaMode', 'alphaMode', 'isXpress', 'licenseMultiaxis', 'license3D', 'metric', 'isAssemblyDocument', 'context', 'strategy', 'operation_description', 'tab_tool', 'group_tool', 'sandvik_tool_params', 'sandvik_select_assembly', 'sandvik_get_tool_recommendation', 'sandvik_edit_assembly', 'tool_select', 'tool_type', 'undercut', 'tool_isTurning', 'tool_isMill', 'tool_isDrill', 'tool_isJet', 'tool_isDepositing', 'tool_taperedType', 'tool_unit', 'tool_number', 'tool_diameterOffset', 'tool_lengthOffset', 'tool_compensationOffset', 'tool_turret', 'tool_manualToolChange', 'tool_breakControl', 'tool_live', 'tool_coolant', 'tool_coolantSupport', 'tool_material', 'tool_description', 'tool_comment', 'tool_vendor', 'tool_productId', 'tool_diameter', 'tool_tipDiameter', 'tool_tipOffset', 'tool_cornerRadius', 'tool_inclusiveAngle', 'tool_taperAngle', 'tool_tipAngle', 'tool_threadProfileAngle', 'tool_tipLength', 'tool_fluteLength', 'tool_shoulderLength', 'tool_bodyLength', 'tool_overallLength', 'tool_shaftDiameter', 'tool_segmentHeight', 'tool_segmentDiameterLower', 'tool_segmentDiameterUpper', 'tool_shaftSegmentHeight', 'tool_shaftSegmentDiameterLower', 'tool_shaftSegmentDiameterUpper', 'tool_threadPitch', 'tool_numberOfTeeth', 'tool_numberOfFlutes', 'tool_kerfWidth', 'tool_nozzleDiameter', 'tool_headClearance', 'tool_machineQualityControl', 'holder_attached', 'holder_description', 'holder_comment', 'holder_vendor', 'holder_productId', 'holder_productLink', 'holder_libraryName', 'tool_productLink', 'tool_holderGaugeLength', 'tool_assemblyGaugeLength', 'group_feedspeed', 'sandvik_get_cutting_data', 'preset_select', 'tool_spindleSpeed', 'tool_stockDiameter', 'tool_surfaceSpeed', 'tool_rampSpindleSpeed', 'tool_useFeedPerRevolution', 'tool_feedCutting', 'tool_feedPerTooth', 'tool_feedProbeLink', 'tool_feedEntry', 'tool_feedExit', 'tool_feedProbeMeasure', 'tool_feedRamp', 'tool_feedPlunge', 'tool_feedPerRevolution', 'tool_feedRetract', 'tool_feedRetractPerRevolution', 'tool_clockwise', 'use_tool_stepdown', 'tool_stepdown', 'tool_finishingStepdown', 'use_tool_stepover', 'tool_stepover', 'tool_finishingStepover', 'tool_rampType', 'tool_rampAngle', 'tool_cutHeight', 'tool_cutPower', 'tool_pierceHeight', 'tool_pierceTime', 'tool_piercePower', 'tool_assistGas', 'tool_pressure', 'tool_abrasiveFlowRate']

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

maurizio_manzi
Advocate
Advocate

Hello,

Thank you very much.

For the names of the parameters, it's very helpful. But how can I see all possible values for a name ?

For example, for : "tool_type" ?

 

Best regards

Maurizio

 

0 Likes

maurizio_manzi
Advocate
Advocate

I think, the only way is to create the desired tool, and see the propertie about the shift-key

(see pic).

03-05-_2023_15-25-07.png

0 Likes