If you generate the DXF from the 3d it always comes out at scale 1 and it's if you take your DXF out of the MEP that the scale is sometimes messed up...
Otherwise we have a great complement to output the files as laser cutting files:
By taking pieces of the answer from each of your comments, I managed to solve my problem and thank you!
The corresponding part of the côde is as follows:
Dim swApp As Object Dim Part As SldWorks.ModelDoc2 Dim swView As SldWorks.View Dim swModExt As SldWorks.ModelDocExtension Dim swPathDir As String Dim swPath As String Dim echf As Variant 'The sheet scale will be stored in fraction format (a:b) Dim echV1 As Variant 'The scale of view 1 will be stored in fraction (a:b) format Dim Rep As Variant 'For MsgBox Storage
Sub RegistrationDXFPDF()
Set swApp = Application.SldWorks Set Part = swApp.ActiveDoc
'------------ Retrieving Information (1) Set swModExt = Part.Extension Set Prop = swModExt.CustomPropertyManager("")
Set swView = Part.GetFirstView ' the first view being the echf = swView.ScaleRatio ' scale retrieval Set swView = swView.GetNextView 'Switching to First Sight echV1 = swView.ScaleRatio ' Scale Retrieve Coin recovery Set swModel = swView.ReferencedDocument Set swModExt = swModel.Extension
'------------ Security Checks '--Checking the scale of the sheet-- If echf(0) <> "1" Or echf(1) <> "1" Then Rep = MsgBox("Attention, the scale of the sheet is " & echf(0) & ":" & echf(1) & vbCrLf & _ "Do you want to continue?", vbYesNo, "Dxf Pdf Recording") If Rep = vbNo Then Exit Sub End If '--Verification of the scale of the view-- If echV1(0) <> "1" Or echV1(1) <> "1" Then Rep = MsgBox("Attention, the scale of the view is " & echV1(0) & ":" & echV1(1) & vbCrLf & _ "Do you want to continue?", vbYesNo, "Dxf Pdf Recording") If Rep = vbNo Then Exit Sub End If