Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

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. :slightly_smiling_face:

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.