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 - Create Setups?

19 REPLIES 19
Reply
Message 1 of 20
pat.callahan1
1894 Views, 19 Replies

CAM API - Create Setups?

 In a video or forum comment Brian Eakins explained that scripting is not seen as a way to create a complete model, but rather a way to support creation of a model with additional UI functionality.  Knowing that, I proceed to create the basic outline of my model in Python using scripting.   My project has a number of simple flat panels with various openings. I was surprised how far I got in the CAD portion of my project using just a few API calls. 

 

Here's what I found most useful in the CAD space:

 

From a few simple python dictionaries and arrays, I was able to create 20 separate panels as individual components.  I was able to populate each panel with a series of openings. 

 

When I came to the CAM side, I found information from early 2016, that indicated that the CAM API does not contain API methods to create Cam setup objects. 

 

It seems kind of basic that an API for an object would expose a method to create one.  Am I missing something?

 

19 REPLIES 19
Message 2 of 20
ekinsb
in reply to: pat.callahan1

I don't remember everything I said in the past but it should be possible to build most parts entirely by using the API.  Most of the modeling features are supported by the API and it's great that you've had the success you've had.

 

However, as you've also found, the capabilities exposed through the CAM API are currently very limited.  Mostly what the current CAM API lets you do is update and export what's already been manually created.  I agree that it would be very useful to be able to automate creating tool paths.  It's a matter of priorities for the CAM team.  I don't know when more functionality will be exposed.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 20
pat.callahan1
in reply to: ekinsb

How do we lobby for better scripting support?

Message 4 of 20
ekinsb
in reply to: pat.callahan1

Post your request in the Idea Station (https://forums.autodesk.com/t5/ideastation-request-a-feature-or/idb-p/125).  You'll certainly get my vote.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 20
daveprecise
in reply to: ekinsb

 

Hi Brian- 

 

Just read the CAM API page. Is there any way to retain the setup (the "only" difference" would be the lofted surface to machine and toolpaths) in my file or do I have to create a new set up for each lofted surface created through the API script you helped me with? 

 

Thanks!

David

IG @daveprecise
Message 6 of 20
ekinsb
in reply to: daveprecise

I'm not sure I fully understand your question but if you're just modifying existing geometry you should be able to automate the modification and then force the existing toolpaths to recomputed.  If you're adding any new geometry there isn't currently any way to modify an existing path to edit what it's supposed to cut.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 7 of 20
daveprecise
in reply to: ekinsb

Hi Brian-

 

I was trying to avoid having to set up cam everytime I created a new curve/loft. Now I understand that it is in fact a new model everytime a dataset via the API is used to create said surface.

 

So, this begs the next question (but I suppose this take me away from the API side) - once the curves are created, how can I use a formula/expression to modify coordinates once inside Fusion?

 

See pic. Thanks!

 

IG @daveprecise
Message 8 of 20
ekinsb
in reply to: daveprecise

The easiest way to edit an existing model is to edit the parameters controlling it.  In your case you would create dimension constraints to the points on the curve you want to modify and then you can edit the parameters controlling those dimensions.  It's also possible to directly modify the point positions through the API but it's more difficult because you have to find the correct point.  Here's an example of editing parameters.

 

http://modthemachine.typepad.com/my_weblog/2016/04/fusion-meetups-and-melting-butter.html

 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 9 of 20
tdcambridge
in reply to: ekinsb

So there is no way to control the stock size via the API?    This was "promised" in phase 2 of the API.  Thanks 

Message 10 of 20
ekinsb
in reply to: tdcambridge

The CAM API has been stagnant since the initial realese.  Phase 2 hasn't happened yet and is not currently scheduled.  It's up to the CAM team to prioritize this in relation to their other tasks.  It would be best to post a request in the IdeaStation so more people are aware of the need and others can also express their interest by voting on it.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 11 of 20
tdcambridge
in reply to: ekinsb

Ok thanks!

Message 12 of 20
tdcambridge
in reply to: ekinsb

Hi what about importing  CAM setups and fixturing via the API ?  

Message 13 of 20
ekinsb
in reply to: tdcambridge

I'm not sure that CAM supports that in the UI but even if it does, the API does not expose this capability.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 14 of 20
tdcambridge
in reply to: ekinsb

Thanks what about using this method?   https://forums.autodesk.com/t5/ideastation-request-a-feature-or/cam-fixture-model-import/idi-p/54005...

 

Is there a place I can see this explained further?   It's not exactly an API but I guess allows an externally specified fixture be imported into a cam workspace?  

 

 

Message 15 of 20
ekinsb
in reply to: tdcambridge

I looked at the comments for the idea you linked to.  It was referring to being able to create fixture models and re-use them in your CAM designs.  They say that this was solved with the introduction of external references in Fusion.  In my tests tool path data is not referenced when you create an external reference so I believe this only solves the issue of re-using geometry.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 16 of 20
tdcambridge
in reply to: ekinsb

Thanks for your clarification on this.  What about the API for Inventor or HSM ?  Do they have a way of loading externally dictated fixtures and stock sizes?   Thanks 

Message 17 of 20
ekinsb
in reply to: tdcambridge

Just to clarify one thing, if it's just re-use of a model as a fixture then you can do that through the API today because the API does support inserting an external file into a design.  That really doesn't have anything to do with CAM but is just a modeling operation.

 

As far as Inventor or HSM itself, there's no API for the Inventor integration and I don't know about HSM.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 18 of 20
erik
in reply to: pat.callahan1

I know this is an old thread but I just wanted to say that I posted a request in the Idea Station for creating setups using code.

 

Link: https://forums.autodesk.com/t5/fusion-360-ideastation-request-a/create-stock-setup-through-api/idi-p...

Message 19 of 20
corry.daus
in reply to: ekinsb

Any movement on the CAM API Phase-2?

Message 20 of 20
erik
in reply to: corry.daus

I just wrote a post in the CAM forum where @balsmen answered and said they are working on something a he would see if he could find a more up to date CAM roadmap.

Post: https://forums.autodesk.com/t5/fusion-360-computer-aided/the-future-for-the-cam/m-p/7792273#M43735

 

Though, I haven't heard anything the last couple of days in regard to my last post.

 

- Erik

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