Automating Custom Layered DXF Exports

Programming and macros
Galletas
Posts: 4
Joined: Wed Apr 17, 2024 9:47 am
Answers: 0
x 4

Automating Custom Layered DXF Exports

Unread post by Galletas »

Hi everyone,

My team and I have had the urge to export SolidWorks drawings to DXF format, in order to share them with our other Team members. Typically this DXF drawings are PCB with various layers such as top face, bottom face, certain areas of maximum component height, etc.

We've seen that in order for them to show these layers properly in Altyium, we need to manually assign the layers and how we want them to be exported (see attatched image 1).

My question is, is there any way to do this automatically, mainly because we don't change the types of layers we export, I mean, we are always setting the same layers and everything, so instead of manually selecting and configuring the layers manually each time, we were thinking of automating this but I have absolutelly no clue from the research I've done.

In case there's another ay of achieving what we want and it's not exactly what I'm stating here, please let me know, we are open to all options.

Thanks for everything in advance.

Gerard.
Attachments
Image 1_Manual Layer Assignation.png
User avatar
AlexLachance
Posts: 2187
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2373
x 2015

Re: Automating Custom Layered DXF Exports

Unread post by AlexLachance »

Galletas
Posts: 4
Joined: Wed Apr 17, 2024 9:47 am
Answers: 0
x 4

Re: Automating Custom Layered DXF Exports

Unread post by Galletas »

AlexLachance wrote: Thu Apr 25, 2024 7:43 am You can create a mapfile

https://help.solidworks.com/2020/englis ... t=P&value=
Thanks, I'll give it a try.

Do you know if it's possible to create a SolidWorks VBA Macro that can use this? If i have understood right, you can save this presets for exporting to DXF to a file, and then load this file so yoou don't have to re.do the layer selecting part right?.

If anyone already has a macro, or knows how to do it please let me know, i'd love to implement this automation for my team.

Thanks,
Gerard
User avatar
AlexLachance
Posts: 2187
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2373
x 2015

Re: Automating Custom Layered DXF Exports

Unread post by AlexLachance »

Galletas wrote: Thu Apr 25, 2024 10:47 am Thanks, I'll give it a try.

Do you know if it's possible to create a SolidWorks VBA Macro that can use this? If i have understood right, you can save this presets for exporting to DXF to a file, and then load this file so yoou don't have to re.do the layer selecting part right?.

If anyone already has a macro, or knows how to do it please let me know, i'd love to implement this automation for my team.

Thanks,
Gerard
I believe it works as you described. If you have layers assigned everywhere then it should export itself accordingly to what is on the drawing. The mapfile is something that "adds" the layers upon exporting, not something to manage them.
Post Reply