Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to specify CAM SETUP WCS Work Coordinate System based on origin point and XYZ vectors via API

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
omedvydskiy
166 Views, 4 Replies

Is it possible to specify CAM SETUP WCS Work Coordinate System based on origin point and XYZ vectors via API

I have origin point and vectors xAxis, yAxis, zAxis.
I want to specify workCoordinateSystem for CAM setup.

 

Method setWithCoordinateSystem returns True but it does not work.

setup.workCoordinateSystem.setWithCoordinateSystem(origin, xaxis, yaxis, zaxis)

 

4 REPLIES 4
Message 2 of 5

Hi,

Just to check, could you post the results of

app.lof(f'{setup.workCoordinateSystem.asArray()=}')

before and after you change it?

 

The result of it is printed in the Text Commands window, below in Fusion's screen.

 

And also the values of origin.asArray(), xaxis.asArray(), yaxis.asArray(), zaxis.asArray()?

 

Message 3 of 5
omedvydskiy
in reply to: omedvydskiy

omedvydskiy_0-1693557614327.pngomedvydskiy_1-1693557629761.png

 

Message 4 of 5

Hi @omedvydskiy ,

 

I was able to reproduce the same situation on my environment.

Looking at the documentation for Setup.workCoordinateSystem Property, it states only to GET its value and it doesn't say anything about setting it:

wtallerdemadera_0-1693599297100.png

I made two additional tests:

- Try to assign a new matrix to setup.workCoordinateSystem: got this error : AttributeError: can't set attribute

- Get the matrix that setup.workCoordinateSystem contains, and update it with setWithCoordinateSystem().  It allowed me to update the matrix but the changes are not reflected in the setup property.

 

Conclusion: I don't thing it is possible to update it at the moment.

 

Regards,

Jorge Jaramillo

Software Engineer

 

Message 5 of 5
omedvydskiy
in reply to: omedvydskiy

Thanks for replay.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report