Export dwg, scale on blocks

Hello

Does anyone know why when exporting to dwg, I end up with a different scale on the blocks?

FYI:

- I first imported a DWG file to SW -> no problems  (incredible!)

- some modifications...

- pdf export -> no pb,  but dwg export: scale corresponding to the scale factor of the sheet but just on the blocks and not the rest.

I read on other forums that you should look at the DIMALTF variable because sw used it rather than the unit, but even by changing this variable, I don't see why it intervenes in the export and not the import...

I don't see any options in sw to manage units or block scaling factor.

If there are autocad (or equivalent) regulars to sw and vice cersa, thank you in advance.

Hello

Check this option:

1:1 Output Scale (Drawings Only)

 

 ActivateExports the drawing using a 1:1 geometry scale, according to your selected base scale.

The scale of the paper or sheet is overlooked when you enable this option.

 Basic ScaleSelects the base used for the 1:1 output of geometry based on the different drawing view scales used in the sheet. If you have selected a view, the basic scale options include the values of View Scale and View Number  . Otherwise, the scale of the view with the highest number is displayed. Number indicates the number of occurrences of a scale in the drawing document.

The views are grouped by scale. If you enable 1:1 output scale, the group with the highest number of views is exported at 1:1 scale, and the remaining views are scaled accordingly. If the drawing does not contain any views, the sheet is exported on a scale of 1:1.

 Notify me if enabledDisplays a warning message when you enable sheet scaling.

If you disable these warning messages when a message appears, you can turn them back on from this option.

 

http://help.solidworks.com/2012/french/SolidWorks/sldworks/HIDD_EXPORT_OPTIONS_DXF.htm

1 Like

Otherwise, see this question where there is a macro to change the scale of all the views of a drawing:

http://www.lynkoa.com/forum/3d/gerer-les-echelles-differentes-lors-d-un-export-dwg

 

1 Like

I tried the different scale options when exporting, but nothing changes on the blocks.

On output, the imported building is correct, but the imported blocks have a scale factor.

By default, the Dimaltf variable is set to 0.4. Changing it to 1 doesn't change anything, but you may have to force an option or other variable to take it into account. I don't know.

A test I hadn't done: I just changed the scale of the MEP under SW, everything changes scale except the imported blocks.

Hello

Do you use a macro for exporting in DWG?

1 Like

No macro, just save as/dwg.

I just tested with batchconverter (in case it works better): same.

 

Is it on a drawing or on a part that you export?

Try the macro to save in DWG:

 

 

Dim swApp As Object

Dim Part As Object

Dim SelMgr As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Dim Feature As Object

Sub main()

 

Set swApp = Application.SldWorks

 

Set Part = swApp.ActiveDoc

Set SelMgr = Part.SelectionManager

Set swModel = swApp.ActiveDoc

 

sPathName = swModel.GetPathName 'Get File Name & Path

Extension = Right(sPathName, 6) 'Determine File Type

 

'Try Again if Not "SLDDRW"

If Extension <> "SLDDRW" Then

    MsgBox ("Current Document Is Not . SLDDRW")

    End

End If

   

'Save as DWG

SaveDWG:

 

sPathName = Left(sPathName, Len(sPathName) - 6) 'Remove "SLDDRW" Extension

sPathName = sPathName + "dwg" 'Add "DWG" Extension

 

Set fso = CreateObject("Scripting.FileSystemObject") 'Check if file exists

If (fso. FileExists(sPathName)) Then 'If file exists

    If MsgBox("Overwrite" & sPathName & "?", vbYesNo) = vbNo Then' Ask if want to overwrite file

    End If

End If

Part.SaveAs2 sPathName, 0, True, False 'Save file if file does not exist or if choose vbYes

 

End Sub

 

And this one to record in DXF:

 

Dim swApp As Object

Dim Part As Object

Dim SelMgr As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Dim Feature As Object

Sub main()

 

Set swApp = Application.SldWorks

 

Set Part = swApp.ActiveDoc

Set SelMgr = Part.SelectionManager

Set swModel = swApp.ActiveDoc

 

sPathName = swModel.GetPathName 'Get File Name & Path

Extension = Right(sPathName, 6) 'Determine File Type

 

'Try Again if Not "SLDDRW"

If Extension <> "SLDDRW" Then

    MsgBox ("Current Document Is Not . SLDDRW")

    End

End If

   

'Save as DXF

SaveDXF:

 

sPathName = Left(sPathName, Len(sPathName) - 6) 'Remove "SLDDRW" Extension

sPathName = sPathName + "dxf" 'Add "DXF" Extension

 

Set fso = CreateObject("Scripting.FileSystemObject") 'Check if file exists

If (fso. FileExists(sPathName)) Then 'If file exists

    If MsgBox("Overwrite" & sPathName & "?", vbYesNo) = vbNo Then' Ask if want to overwrite file

    End If

End If

Part.SaveAs2 sPathName, 0, True, False 'Save file if file does not exist or if choose vbYes

 

End Sub

Well in fact it's a known bug at sw.