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: 

Paramaterized Patterns using Excel Data

7 REPLIES 7
Reply
Message 1 of 8
matt.culik
196 Views, 7 Replies

Paramaterized Patterns using Excel Data

I'm trying to laser cut a foam socket organizer. I need a 2D DXF file for my laser cutter software. I have a bunch of sockets and a digital caliper that sends measurements to Excel at the click of a button. 

 

What I'd like to do is create a parameterized sketch block that includes a circle where the socket will sit and the socket label. Ideally, I'd be able to measure each socket, send the actual diameter to Excel, and add a standardized clearance amount and a label. Then, I'd assign the relevant column headers to my parameterized sketch block and Fusion 360 would spit out a sketch block for each socket. Then, I'd lay the blocks out, save the sketch as a DXF and go to town on the laser cutter.

 

Does anyone know if this can be done in Fusion 360? If not, is there any software you're aware of that can?

 

Thanks!

 

 

7 REPLIES 7
Message 2 of 8
BrianEkins
in reply to: matt.culik

Fusion doesn't have anything like a sketch block, but what you want to do would be simple enough to create directly in a sketch since it will just be placing circles and text. There are plenty of small samples in the API help that show how to create a sketch and draw a circle and text.

 

The Fusion API doesn't have anything to read from an Excel file, but Python does. There is some built-in capability to read from a CSV file, which will be the easiest.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 8
matt.culik
in reply to: matt.culik

@BrianEkins - Just confirming what I think you're saying...

 

Use Python to "pull" the data from CSV and then turn that data into a sketch by pushing it into Fusion using their API?

 

If I'm correct, that sounds interesting. I've never done any programming like that before, but it's been on my list of things to try/learn. 

 

Aside from creating the "sketch blocks," does the API have any functionality to automatically distribute/align them?

 

Thanks!

Message 4 of 8
BrianEkins
in reply to: matt.culik

You understand what I'm suggesting. There's nothing in Fusion, or the API, to help in organizing the shapes. You'll need to do that yourself in your code. When you create the geometry, you'll be defining the coordinates of the geometry and can calculate where it needs to be positioned.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 5 of 8

If this will be a script development just to make a single design, best option is to do it with the application or with another app that allow you to export the DXF file; it could be a big effort which is not worth.

But if your intention is to learn how to develop scripts, it is a good option.

Take into account that almost the same steps you make in the designer, need to be replicated in the script development, like for example, create sketch, draw circumference, add constraints, and so on.

 

Message 6 of 8
matt.culik
in reply to: matt.culik

@Jorge_Jaramillo@BrianEkins - I do want to learn how to develop scripts, but also need to be realistic with my time. If you guys know of a program that would allow me to create sketch blocks from Excel/CSV/whatever tabulated data and export as a 2D DXF, that would be awesome.

 

Thanks!

Message 7 of 8

Hi, the online API documentation comes with use case examples, which were very useful when I started learning the API. I'd suggest to start from there.
Then you can learn specific python modules to extent the functionality of your developments.
Message 8 of 8
BrianEkins
in reply to: matt.culik

I suspect what you want is unique enough that it's unlikely you'll find something existing that does exactly what you want. I know it's a lot to grasp when you first start, but having a project is the best way to learn it.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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