- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am struggling with the problem of horizontal drilling from slot of time and I am still not able to find s practical solution.
My machine have a set of side horizontal drill from back, front, right and left. The drills have a specific tool name but each time I need to select the correct direction for each tool instead of simply say that each tool correspond to an axis of the current wcs.
I wold like also to do a template where to save this informations but the template is not able to save any direction, can only save if I check the invert axis in the tool direction (that's a little weird but us ok).
I am sure that I am not the only one with this kind of problem, how have you solved it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm not exactly following along with the issue you're having. What sort of machine is this?
Would you be able to share your Fusion file here or privately?
File > Export > Save to local folder, return to thread and attach the .f3d file in your reply. To share the file privately, it's the same process, but email it to me: seth DOT madore AT autodesk DOT com

Seth Madore
Customer Advocacy Manager - Manufacturing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, the machine is an SCM tech z1 and is nothing special. Is a cnc for wood working that have a set of horizontal drills, like plenty of other machine.
The "problem"is that if I want to use the side drill I need to specificate the tool orientation manually, while simply the tool 58 can machine only from the right side of the piece (Z orient on the X wcs), the 68 from left (X reverse) etc.
All work perfectly, but is time consuming and can cause error if I want to change the orientation of the panel or if I select the wrong line fo reference of the tool orientation.
The perfect and efficient way to use it would be to connect the tool orientation with a specific axis of the wcs and save it on a template.
The problem is that is not possible and each time I insert this machining I need to select the tool orientation in the correct way or orient all the panels in the design how would be machine, orient a full set and copy it through all the setup.
As you imagine it require time and is a really stupid way to spend time in, it can be easily automate and error free.
Daniele
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My last try was to make a script that changes the tool orientation according to the wcs axis, to launch after I assign the template to the setup.
It's late and I am not good with python and API, I know that I need to follow a special rule to assign the geometry to the selection but now I need to sleep and I am not 100% sure that I can assign a vector to this specific parameter.
I attach some line of the code that I add to my existing script that set the origin and the name of the setups, if someone want to contribute to finish it I will appreciate, else I will follow the thread with the hopefully right script. ![]()
good night
(origin, xAxis, yAxis, zAxis) = setup.workCoordinateSystem.getAsCoordinateSystem()
for op in ops:
opName=op.name
if opName=='BORR 8 LEFT':
opToolOrient0=op.parameters.itemByName('overrideToolView')
opToolOrient0.expression="true"
opToolOrient1=op.parameters.itemByName('view_orientation_mode')
opToolOrient1.expression="'axesZX'"
opToolOrientZ=op.parameters.itemByName('view_orientation_axisZ')
opToolOrientZ.expression="true"
opToolOrientZ.expression.value=xAxis
clearly ops is the variable that refer the operations inside the setup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
While we don't have this ability currently, it's something we're keen on solving in the near term. Part of the work we are undertaking currently should give users the ability to save Tool Orientation intent in their Templates (among many other QoL improvements)

Seth Madore
Customer Advocacy Manager - Manufacturing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Nice to hear that, it will save alot of time and potential errors.
For now I am trying to implement by API, but I am still not able to select the right direction in an easy way. Do you know if I can use the vector of the X or Y axis that I extract from the wcs like in the python script in the previous post or I must draw a line follow this vector and try to insert this value?
(origin, xAxis, yAxis, zAxis) = setup.workCoordinateSystem.getAsCoordinateSystem()
for op in ops:
opName=op.name
if opName=='BORR 8 LEFT':
opToolOrient0=op.parameters.itemByName('overrideToolView')
opToolOrient0.expression="true"
opToolOrient1=op.parameters.itemByName('view_orientation_mode')
opToolOrient1.expression="'axesZX'"
opToolOrientZ=op.parameters.itemByName('view_orientation_axisZ')
opToolOrientZ.expression="true"
cadObjectParam: adsk.cam.CadObjectParameterValue = opToolOrientZ.value
zdirection=cadObjectParam.value
zdirection.append(xAxis)
cadObjectParam.value = zdirection
I have tried to follow the indication in the documentation but it still does not seems to work.
thanks
Daniele
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
It seems that I able to find the way to set correctly (at least most of the time) the Z orientation. I paste here my work in progress code hoping that can help someone.
I will try to ask some help in the API section of the forum.
have a good day all
import adsk.core, adsk.cam, traceback, os
def run(context):
ui = None
try:
app = adsk.core.Application.get()
doc = app.activeDocument
products = doc.products
design = app.activeProduct
if not design:
ui.messageBox('No active Fusion design', 'No Design')
return
# Get the CAM product
cam = adsk.cam.CAM.cast(products.itemByProductType("CAMProductType"))
# List of all setups
setups = cam.setups
for setup in setups:
#keep model in the setup
setupBodies=setup.models
#check and count programs already exist
ops=setup.operations
opsNum=ops.count
if setupBodies.count>0:
setupFirstBody=setupBodies.item(0)
(origin, xAxis, yAxis, zAxis) = setup.workCoordinateSystem.getAsCoordinateSystem()
for op in ops:
opName=op.name
if opName.startswith('BORR 8 LEFT'):
opToolOrient0=op.parameters.itemByName('overrideToolView')
opToolOrient0.expression="true"
opToolOrient1=op.parameters.itemByName('view_orientation_mode')
opToolOrient1.expression="'axesZX'"
opToolOrientZ=op.parameters.itemByName('view_orientation_axisZ')
opToolOrientZ.expression="true"
firstBody=setupFirstBody
facesModel=firstBody.faces
#transBody=firstBody.transform
#transMatrix=transBody.asMatrix()
searchEdge=True
rak=0
rakMax=facesModel.count
while searchEdge and rak<=rakMax:
faceModel=[]
faceModel=facesModel.item(rak)
rak=rak+1
facePlane=faceModel.geometry
if facePlane.objectType=="adsk::core::Plane":
faceNormal=facePlane.normal
if xAxis.isParallelTo(faceNormal):
newZ=faceModel
cadObjectParam=[]
cadObjectParam: adsk.cam.CadObjectParameterValue = opToolOrientZ.value
opZ=cadObjectParam.value
opZ=newZ
cadObjectParam.value = [opZ]
angleZs=abs(xAxis.angleTo(faceNormal))
if angleZs>1:
op.parameters.itemByName('view_orientation_flipZ').expression='false'
else:
op.parameters.itemByName('view_orientation_flipZ').expression='true'
searchEdge=False
#axis=cadObjectParam.value
#axixAxiss.assign(xAxis)
#if newZ.isValid:
#regen operation of the setup
cam.generateToolpath(op)
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Fusion