Community
Fusion Design, Validate & Document
Stuck on a workflow? Have a tricky question about a Fusion (formerly Fusion 360) feature? Share your project, tips and tricks, ask questions, and get advice from the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API for Fusion 360

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
jeffchuber
1611 Views, 14 Replies

API for Fusion 360

If I recall correclty, Carl Bass mentioned at Maker Faire this year that Autodesk would be releasing a Python and Javascript API for fusion 360. 

 

I was wondering if there was any update timeline for that? 

 

Thanks!

Tags (1)
14 REPLIES 14
Message 2 of 15
Helmi74
in reply to: jeffchuber

i'd too like to have some information on that
---
Frank / @helmi

Established 1974. Internet addicted since 1994. Collector of Kudos.
Message 3 of 15
charegb
in reply to: Helmi74

Hello Jeff, Frank,

We are indeed working on a comprehensive API for Fusion 360. We intend to have a full C++ API and a scripting version of the API, starting with JavaScript, for automation. We are looking at releasing a tech preview in late summer/Fall.

 

I would really like to get some early feedback from interested users like you. I'll set up a call in a month or so to show you what we have built so that your can tell me how it will work for you.

 

Regards,

Bankim

 

Message 4 of 15
Helmi74
in reply to: charegb

sounds interesting. I don't have any special plans for the API yet but i'm sure some ideas will grow as the functionality is there. Looking forward to get some information about that on the call.
---
Frank / @helmi

Established 1974. Internet addicted since 1994. Collector of Kudos.
Message 5 of 15
jeffchuber
in reply to: charegb

Hey Bankim,.

 

I *do* have specific plans ... Why did you choose javascript over python? It seems the CAD community is much more fluent in python than Javascript. Or even something like Ruby to appeal to the massive ruby community. When you say a "scripting version" - what do you mean by that? Looking forward to the call - do you have my contact info?

 

Thanks!

 

Jeff

Message 6 of 15
charegb
in reply to: jeffchuber

Hi Jeff,

It's exciting for us that you have plans to build things with the API.

 

We have chosen JS as the first scripting language because HTML+JS allows you to create very powerful custom UIs for whatever you are building, something that is not trivial in Python. Also, please keep in mind that starting with JS doesn't mean we can't do Python in the future... we had to choose one so that we can deliver a good experience in one environment rather than spreading the tea thin supporting multiple environments from the get go.

 

As soon as I'm ready in a week or two to show you a demo of what we have built so far, I'll post to his thread and also the broader group to setup one on one web meetings.

 

Thanks,

Bankim

bankim.charegaonkar@autodesk.com

248 449 2213

Product Manager - Fusion 360

Message 7 of 15
jeffchuber
in reply to: charegb

Hey Bankim, How's the API coming along? I can see "Show Text Commands" in Fusion now. Is that the "API"?
Message 8 of 15
charegb
in reply to: jeffchuber

Hi Jeff,

Thanks for the reminder, I'm late checking back in to this thread.

 

The new API will be available in the next update of Fusion that is comming soon. As I have mentioned before we will support JavaScript as the scripting language in this update but the plan is to support C++ and Python versions of the API in subsequent updates too.

 

Here is a sample to give you an idea of what the API will look like. This following script will open a comma seperated file and read in point information to create a spline in the active document. This is only a small example of what you can do. 

 

  var app = adsk.core.Application.get();
        ui = app.userInterface;
        
        var design = adsk.fusion.Design(app.activeProduct);
        var title = 'Import Spline CSV';
        if (!design) {
            ui.messageBox('No active design', title);
            adsk.terminate();
            return;
        }
        
        var dlg = ui.createFileDialog();
        dlg.title = 'Open CSV File';
        dlg.filter = 'Comma Separated Values (*.csv);;All Files (*.*)';
        if (dlg.showOpen() !== adsk.core.DialogResults.DialogOK) {
            adsk.terminate();
            return;
        }
        var filename = dlg.filename;
        
        var buffer = adsk.readFile(filename);
        if (!buffer) {
            ui.messageBox('Failed to open ' + filename);
            adsk.terminate();
            return;
        }
        var data = adsk.utf8ToString(buffer);
        data = data.split('\n');
        var i, j, points = adsk.core.ObjectCollection.create();
        for (i = 0;i < data.length;++i) {
            data[i] = data[i].split(',');
            for (j = 0;j < data[i].length;++j) {
                data[i][j] = parseFloat(data[i][j]);
            }
            if (data[i].length >= 3) {
                var point = adsk.core.Point3D.create(data[i][0], data[i][1], data[i][2]);
                points.add(point);
            }
        }
        
        var root = design.rootComponent;
        var sketch = root.sketches.add(root.xYConstructionPlane);
        sketch.sketchCurves.sketchFittedSplines.add(points);
        

 

If you, or anyone else interested in this topic, would like to talk to me about the API and how you would want to use it, please email me bankim.charegaonkar@autodesk.com.I'll happily setup a web meeting for us to look at the current API and talk about we can enhance it in the future.

 

Thanks,

Bankim

Message 9 of 15
jeffchuber
in reply to: charegb

Awesome - this is a great example.

I'll ask this here - because I think others will find it interesting. How will you install the library to access this? Will it be on npm? Is it talking to the cloud or a local version of fusion? if it's talking to the cloud - how do you auth in?

Happy to take this offline if it's too much for the forums.

thanks!
Message 10 of 15
charegb
in reply to: jeffchuber

Hi Jeff,

This API, the script editor and debugger will all be included in the next update. You won't have to install any libraries to work with it, the update will just deliver everything you need.

 

This first release of the API focuses on the design space so all the APIs will work on the active doc or other open docs and all the execution is local. We absolutely plan to give you access to cloud data via the API but as you expect, calling remote is slightly more tricky with authentication,tokens and keys involved. We are working though how we can make this secure but simple and will address this in a future update in Fall.

 

Thanks,

Bankim

Message 11 of 15
jeffchuber
in reply to: charegb

Awesome - looking forward to it. Let me know if you'd like some feedback from someone who has worked with a lot of APIs in the past.
Message 12 of 15
charegb
in reply to: jeffchuber

Hi Jeff and other API tinkerers,
The new release is live with the JS API. Please checkout the documentation here and start building! 
http://fusion360.autodesk.com/resources (Programming Interface in the index on the left)

 

Cheers,
Bankim

Message 13 of 15
jeffchuber
in reply to: charegb

Awesome! I will try it out soon! Where should I send feedback?

Message 14 of 15
prabakarm
in reply to: jeffchuber

Thanks for trying out the API functionality.  Please share your feedback in this forum.  If you have new ideas, idea station would be better.

 

Thanks,

Prabakar.

Message 15 of 15
charegb
in reply to: prabakarm

We have an API preview forum  here - http://forums.autodesk.com/t5/preview-api-and-scripts/bd-p/22

 

Please post questions or comments here and our API team and I will answer asap..

 

Cheers,

Bankim

 

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

Post to forums  

Autodesk Design & Make Report