What determines the SW direction when converting to Dxf?

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
Ömür Tokman
Posts: 359
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 993
x 345
Contact:

What determines the SW direction when converting to Dxf?

Unread post by Ömür Tokman »

Hello guys,
have a good day,
What determines the SW direction when converting to Dxf?
most of the time it is different from the view I set.
Is there a way to save as I set it?
2021-12-21_09-26-56.png
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
Frank_Oostendorp
Posts: 221
Joined: Tue Mar 09, 2021 7:25 am
Answers: 3
Location: Netherlands
x 183
x 229

Re: What determines the SW direction when converting to Dxf?

Unread post by Frank_Oostendorp »

To avoid to have to change DXF orientation, we sketch on the front plane, in the view orientation we prefer for the DXF, having the optional special surface of the sheet metal towards you.
User avatar
Ömür Tokman
Posts: 359
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 993
x 345
Contact:

Re: What determines the SW direction when converting to Dxf?

Unread post by Ömür Tokman »

Frank_Oostendorp wrote: Tue Dec 21, 2021 6:39 am To avoid to have to change DXF orientation, we sketch on the front plane, in the view orientation we prefer for the DXF, having the optional special surface of the sheet metal towards you.
I determine the flat pattern surface, there is no problem in that. (macro) .
If you pay attention to the drawing, it rotates clockwise. I want to prevent this.
2021-12-21_17-02-50.jpg
edit:
Additionally, that's not the method I'm talking about. yes, it is determined in this way and results in the correct output, but it is necessary to deal with each part individually. I am getting dxf from the assembly with the help of a macro.
2021-12-21_17-16-46.png
2021-12-21_17-16-21.png
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
User avatar
jcapriotti
Posts: 1852
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1196
x 1984

Re: What determines the SW direction when converting to Dxf?

Unread post by jcapriotti »

Edit the "Flat-Pattern" feature. There is a "fixed" face selection you can change. This will drive the "up" side shown when exporting, yours is most likely on the back face which is flipping it over. Unfortunately, I don't believe there is a way to control the rotation except as in the export dialogue to define an X-Y direction.
Jason
User avatar
Ömür Tokman
Posts: 359
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 993
x 345
Contact:

Re: What determines the SW direction when converting to Dxf?

Unread post by Ömür Tokman »

jcapriotti wrote: Tue Dec 21, 2021 12:05 pm Edit the "Flat-Pattern" feature. There is a "fixed" face selection you can change. This will drive the "up" side shown when exporting, yours is most likely on the back face which is flipping it over. Unfortunately, I don't believe there is a way to control the rotation except as in the export dialogue to define an X-Y direction.
Hi @jcapriotti Thank you for the answer, the face is in the right direction. there is no problem with that, i was just looking for a way for xy.
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
User avatar
gupta9665
Posts: 405
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 426
x 445

Re: What determines the SW direction when converting to Dxf?

Unread post by gupta9665 »

Ömür Tokman wrote: Wed Dec 22, 2021 1:19 am Hi @jcapriotti Thank you for the answer, the face is in the right direction. there is no problem with that, i was just looking for a way for xy.
Alignment array takes care of the XYZ
Alignment Array.PNG
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
Ömür Tokman
Posts: 359
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 993
x 345
Contact:

Re: What determines the SW direction when converting to Dxf?

Unread post by Ömür Tokman »

then as i understand i need to start drawing by calculating yxz in order to position flat pattern correctly.
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
Frank_Oostendorp
Posts: 221
Joined: Tue Mar 09, 2021 7:25 am
Answers: 3
Location: Netherlands
x 183
x 229

Re: What determines the SW direction when converting to Dxf?

Unread post by Frank_Oostendorp »

By sketching on the front plane, or importing an existing DXF and rotate this in the desired rotated angle, and extrude the sheet, we always have the desired result of side and angle in the exported DXF of the front surface of the unfolded sheet metal part. No need to do anything more.
Joe Soo
Posts: 1
Joined: Mon Aug 05, 2024 1:57 pm
Answers: 0

Re: What determines the SW direction when converting to Dxf?

Unread post by Joe Soo »

Hi, everyone,
Is it possible by assign a new coordinate system having its X-axis aligned with the edge which to be horizontal in the DXF output?

ChatGPT generated the code below:
'Define the coordinate system name (should match the one in your parts)
coordSystemName = "CoordSys1" ' Adjust this name as needed

'Set the export options
Set swExportMgr = flatPattern.GetExportFlatPatternData
dxfOptions = swExportFlatPatternToDXF
swExportMgr.SetOutputType dxfOptions
swExportMgr.SetCoordinateSystem coordSystemName

However, I am not able to make it works.
I am not a macro guy, hope someone can help out if it is possible by Modify the "Export flat patterns from SOLIDWORKS part or assembly components".
It is useful for sheet metal SS304 which having a grain direction requirement.
Thanks
Post Reply