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: 

Simple Python Example Request

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
stevemedwin
1687 Views, 5 Replies

Simple Python Example Request

I would like to learn how to use Python with Fusion 360 but I find the gap between the Test Script and the other script examples too large. Would someone post a simpler example, perhaps creating a cube or a pattern of cubes? I have experience with OpenSCAD but find it too limited for organic modeling. It would be great to explore the programmability of organic shapes using Python and Fusion but I need some help getting started.

 

Thanks in advance,

Steve Medwin

http://www.thingiverse.com/stevemedwin/designs

 

5 REPLIES 5
Message 2 of 6
ekinsb
in reply to: stevemedwin

Hi Steve,

 

Please take a look at the Fusion help.  There's a "Programming Interface" topic in the main table of contents.  Undeer that you'll find a "Sample Programs" topic with several simple samples.  Expect this list of samples to grow significantly over the next few releases.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 6
stevemedwin
in reply to: ekinsb

Thanks! That should help me get started.

 

Steve

Message 4 of 6
prainsberry
in reply to: stevemedwin

Hey you may already be past this, but here is a script to create a cube.  I used this in a class I did at AU a couple weeks ago.  Sorry I missed this topic earlier.

 

PYdrawCube is very verbose and doesn't do any looping on purpose so you can just follow the steps the API takes.

 

PYdrawProfile uses a little better programming techniques and lets you just start with a generic array of points.  I have another version that imports from a file if you are interested.



Patrick Rainsberry
Developer Advocate, Fusion 360
Message 5 of 6
stevemedwin
in reply to: prainsberry

Thanks for these examples. These will be good to study. Can you post the other one you mentioned? 

 

Any chance that your class at AU was recorded?

 

Thanks,

Steve

Message 6 of 6
prainsberry
in reply to: stevemedwin

No problem.  I had to translate it from javascript.  I am just trying to learn some Python myself.  Here you go.  This shows some file input stuff.  I am not sure if the session was recorded.  I'll get back to you.



Patrick Rainsberry
Developer Advocate, Fusion 360

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