Hi @maurizio_manzi
You can follow this sample
https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-13e1321f-cfa6-48d7-a75a-fa74d88549d1https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-13e1321f-cfa6-48d7-a75a-fa74d88549d1
Its slightly differnt that it uses the compoenet origin for the coordinate system method
but in a simple here is something how it would work if I have one component and the one cam setup and it modify the cam setup to use the components X and Y origin
doc = app.activeDocument
cam : adsk.cam.CAM = doc.products.itemByProductType('CAMProductType')
design : adsk.fusion.Design = doc.products.itemByProductType('DesignProductType')
rootComp = design.rootComponent
occ = rootComp.occurrences.item(0) ## using the first occurrence
component = occ.component
setup = cam.setups.item(0) ## modifying the first setup
setup.parameters.itemByName('wcs_orientation_mode').expression = "'axesXY'"
xOrigin :adsk.cam.CadObjectParameterValue = setup.parameters.itemByName('wcs_orientation_axisX').value
xOrigin.value = [component.xConstructionAxis.createForAssemblyContext(occ)] ## using the xConstructionAxis of the component
yOrigin :adsk.cam.CadObjectParameterValue = setup.parameters.itemByName('wcs_orientation_axisY').value
yOrigin.value = [component.yConstructionAxis.createForAssemblyContext(occ)] ## using the yConstructionAxis of the component
Boopathi Sivakumar
Senior Technology Consultant