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: 

CAM API - Use Machine Override

2 REPLIES 2
Reply
Message 1 of 3
Skullivan
212 Views, 2 Replies

CAM API - Use Machine Override

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!

Tags (4)
Labels (4)
2 REPLIES 2
Message 2 of 3

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

Message 3 of 3

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 🤷‍

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

Post to forums