Recurring problem drawing view in draft quality

Hi, I have a little bit of code that puts all the views back in "high quality". 

If it helps. 

'met les vues en haute qualité

    Dim swView As SldWorks.View
    Dim bRet As Boolean
    Set swApp = Application.SldWorks
    Set swDraw = swApp.ActiveDoc
    Set swSheet = swDraw.GetCurrentSheet
    Set swView = swDraw.GetFirstView
    While Not swView Is Nothing
        If swSheet.GetName <> swView.Name Then
            ' Does not work on drawing sheet, which IDrawingDoc::GetFirstView returns
            bRet = swView.SetDisplayMode3(False, swView.GetDisplayMode2, False, True): Debug.Assert bRet
        End If
        Set swView = swView.GetNextView
    Wend

 

1 Like

Hello

I had the same problem with a drawing of a large assembly that gave me empty views when exporting to dwg or dxf

I found the part that made a mess by exporting the assembly in iges and reconstituting it from the iges

At that time, I got a message that a certain part was causing problems.

I redid it and reintegrated it into the original assembly

And there the dwg export worked correctly!

I think that this way you can find the lizard in a big assembly without worrying about it!?

Kind regards