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

CAM API - Use Machine Override

Skullivan
Participant

CAM API - Use Machine Override

Skullivan
Participant
Participant

Hi all,

I have run into an interesting issue where I want to override the property "use machine configuration". I can't seem to find any documentation on how to disable this when I want to post process a setup that has a machine. The problem is that I am trying to control which post is used because while we are using machine simulation for one of our brother CNCs, it needs to use the Fusion 360 Generic 5axis post to actually simulate the machine. If you post with this it fails.

So my add-in is referencing the specific post it needs to succeed BUT it seems to keep defaulting to the post that is attached to the machine defined in the CAM setup. Therefore it fails. We found that if we remove the post associated with the machine then it successfully posts the .nc file.

So basically I want to keep the bad post associated for simulating the machine correctly but use a different post to actually post process the .nc file.

Another thought I had, could I somehow set or delete an attribute of machine to make it use the supplied post filepath instead? Or can anyone think of another way to do this? Any help would be greatly appreciated!

0 Likes
Reply
375 Views
2 Replies
Replies (2)

boopathi.sivakumar
Autodesk
Autodesk

Hi @Skullivan 

This is a know bug which the team is already aware of. Probably it will get fixed in the next release. today there is no way other than to remove the machine in the setup.


Boopathi Sivakumar
Senior Technology Consultant

1 Like

Skullivan
Participant
Participant

Thank you Boopathi, that's good to hear it's already been tagged. 

 

I did however find a way to invalidate the current machine so that it will use the post that I supply it. I had to reassign the postUrl to something that wouldn't work.

 

 

cam : adsk.cam.CAM = app.activeDocument.products.itemByProductType('CAMProductType')
for setup in cam.setups:        
        alteredMachine = setup.machine
        alteredPost = alteredMachine.postUrl.create('idk')
        alteredMachine.postUrl = alteredPost
        setup.machine = alteredMachine

 

 

After the machine is altered then you can post with the postProperties you normally would set up. This breaks the link to the machine, but as far as I can tell it does not change anything in the cloud, just your local doc this is running in. So this is at least a workaround for me 🤷‍

0 Likes