Try to open a Part or Assy invisible or in Background

Hi there,

With a drawing open I start a macro who opens a Part or Assy to get for example the BoxSize from the model.

I like to open te Part or Assy invisible or in Background, I don't have/don't like to see this operation.

I've tried:

            ' Allow SolidWorks to run in the background

            ' and be invisible

            swApp.UserControl = False

          

            ' If the following property is true, then the

            ' SolidWorks frame will be visible on a call to

            ' ISldWorks::ActivateDoc2; so set it to false

            swApp.Visible = False

       

            ' Keep SolidWorks frame invisible when

            ' ISldWorks::ActivateDoc2 is called

            Dim pFrame As Frame

            Set pFrame = swApp.Frame

            pFrame.KeepInvisible = True

And Reverse:

            ' Show SolidWorks frame and SolidWorks

            pFrame.KeepInvisible = False

            swApp.Visible = True

But I can't get it to work correctly, I still can watch the 'opening file' operation.

Anyone knows how to handle this ?

Greetings,

Check Master     

SolidworksApi macros