Batch export DXF

Batch export DXF

3d_low
Enthusiast Enthusiast
6,366 Views
35 Replies
Message 1 of 36

Batch export DXF

3d_low
Enthusiast
Enthusiast

Hi,

 

I'd like to know if there is a script or a plugin that would allow me to batch export all flat patterns in an assembly? I do a lot of parametric sheet metal assemblies and it would save me a lot of time when I have 20 flats to export individually. Also, as a suggestion, i think it would be great if the flat pattern view would show the part name that is being viewed and maybe default the export name to the part name. 

 

Any help would be appreciated. Thanks

6,367 Views
35 Replies
Replies (35)
Message 2 of 36

travis
Contributor
Contributor

I second this request.  This functionality seems rather straight forward and could save a lot of time.

0 Likes
Message 3 of 36

BrianEkins
Mentor
Mentor

Unfortunately, the API doesn't support access to the flat pattern information yet so it's not possible to write something like this.  Hopefully, not too far in the future.

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

gvisca44
Advocate
Advocate

I second this.

0 Likes
Message 5 of 36

gvisca44
Advocate
Advocate

Hi @3d_low (and others).

 

I have written some code that now does this.  

 

Basically it will:

* Ask where you want the DXF files stored (folder location).

* Scan the model and look for Sheet Metal bodies (if body.isSheetMetal)

* Save the flat pattern DXF file to your chosen file - based on:

* folder location = material.name thickness=xx.xx (example: Galvabond G2 thickness=1.2), filename = component.name.DXF (example: 0400-S002.DXF).

* The material is extracted from each component's properties, and the thickness is extracted from each component's sheet metal rule.

* At completion - a log file is created with any error messages.

 

Log messages:

* If a part is sheet metal, but doesnt have a sheet metal rule.

* If a part is sheet metal, but a flat pattern hasnt been created.

* If a flat pattern exists but is unhealthy.

* along with other file related conditions.

 

Exporting around 100 sheet metal parts takes less than 60 seconds !

 

Glenn

 

Message 6 of 36

travis
Contributor
Contributor

that would be a great addition to fusion.

0 Likes
Message 7 of 36

AlessandroZap
Enthusiast
Enthusiast

hi @gvisca44 ,

is your script open or available somewhere?

0 Likes
Message 8 of 36

gvisca44
Advocate
Advocate
Hi,

I’ll post a copy over the next few days.
Message 9 of 36

bartparker
Contributor
Contributor
Also very interested in this!
0 Likes
Message 10 of 36

kandennti
Mentor
Mentor

Since there were requests for it in the Japanese forum, we have created an add-in and released it to the public.

 

https://github.com/kantoku-code/Fusion360_BLACKSMITH 

Message 11 of 36

AlessandroZap
Enthusiast
Enthusiast
That's great! Thank you so much!
Message 12 of 36

kandennti
Mentor
Mentor

Improved functionality. (ver 0.0.5)

https://github.com/kantoku-code/Fusion360_BLACKSMITH 

 

  • No more need to create flat patterns in advance.
  • Multiple sheet metal bodies can be exported, even if they are contained within a single component.
  • Sheet metal bodies in external components (with links) are also processed.
0 Likes
Message 13 of 36

gvisca44
Advocate
Advocate

Holy moly !!

 

Thats far fancier than mine !!!

 

Glenn.

Message 14 of 36

AlessandroZap
Enthusiast
Enthusiast
Hi @kandennti,

I would report some issues with the BLACKSMITH add-in:

- The new DXF Export from Sheet Metal Body doesn't work for me: the assigned folder open up empty (no file is exported); same for SAT
- The old Flat Pattern Export works with some errors: If I select all flat pattern from the dialog box, just a part of them are exported. If I select a single file (from those not exported) the addin manage to export it. Same for SAT.

My environment is:
Fusion 360 2.0.15995 x86_64 [Native]
macOS 12.6.5 (21G531) on MacBookPro13,2

Thank you for sharing your work.
0 Likes
Message 15 of 36

kandennti
Mentor
Mentor

Hi @AlessandroZap.

Thanks for reporting the problem.

 

It may be that I was testing with only a very simple model.
It would be helpful if you could provide me with data that could reproduce the situation, but that will probably be difficult.

 

Please tell us a little about the actual situation you worked on.
・Did you include sheet metal bodies with complex geometry?
・Were there multiple sheet metal bodies within a single component?
・Were there components with flat patterns already created?

 

0 Likes
Message 16 of 36

AlessandroZap
Enthusiast
Enthusiast
@kandennti

thanks for your answer. Indeed I'm working on a complex project with a lot of components and some of them has complex geometry.

To give you more data, I did some tests:

- About the second issue (flat pattern list partially exported) I can tell you that the origin of the problem is in my components. Actually, despite a flat pattern is created, Fusion neither couldn't export the DXF file, returning an unknown error.
So, it seems that the BLACKSMITH addin stop processing when an error occurs leaving the file queue unprocessed. It would be just helpful to have a pop-up window that shows which files weren't exported.

- About the first issue (no flat pattern file exported from Metal Sheet Body):
the problem doesn't seem to be linked to the model specifications. I tried to run the function with one or two simple Sheet Metal Body with or without flat pattern already created; no positive results.

0 Likes
Message 17 of 36

kandennti
Mentor
Mentor

@AlessandroZap  Thanks for the reply.

 

In writing the rough process, only one flat pattern can be created per component.
To avoid this problem, if there are multiple sheet metal bodies in a component or if there is a flat pattern from the beginning, a new flat pattern is created while deleting the flat pattern.
In the case of sheet metal bodies with complex shapes, we feel that we may be deleting the flat pattern before the flat pattern export is complete.

 

Also, I think it is possible to display a message about the bodies that could not be exported, since it is possible to check the existence of the file after processing.

 

I am very sorry, but I am working on something else, so please give me some time.

Message 18 of 36

AlessandroZap
Enthusiast
Enthusiast

@kandennti 

Don't worry, I was just giving some (hopefully) useful data to analyze the problem.
Thanks again for sharing your work. Once completed it could really save a lot of time for exporting activity.

Cheers

Message 19 of 36

AlessandroZap
Enthusiast
Enthusiast

Hi @gvisca44 

is there any news for your addin to be available?

Thanks

0 Likes
Message 20 of 36

kandennti
Mentor
Mentor

@AlessandroZap .

 

We were able to identify the cause of the problem and have released a corrected version. (ver 0.0.10)

https://github.com/kantoku-code/Fusion360_BLACKSMITH 

 

When export fails, the file path is output to the text command window.

export_err_eng.png


Here is an example of a failed export.
A sheet metal body with holes drilled with a spline drawn in a sketch.

1.png

In such a case, although a flat pattern can be created, even manual operation fails with an error when exporting DXF.