3 Replies Latest reply on Feb 4, 2014 2:42 PM by Andrea Orlando

    Pack and Go: Very Slowly

    Andrea Orlando

      I have a MACRO that execute a pack and go of one model from a directory that contain many files (10.000 or more).


      If model is an assembly, its depend from 2 to max 10 sub-parts.


      In the 90% of cases the model is a single part.


      I don't want to pack and go the drawings (there is not present !), only models. In my MACRO I set the flag for "NO DRAWINGS":



      VB Code

      Sub DocPackAndGo(sFilePackAndGo As String)

          Dim swModelDoc As SldWorks.ModelDoc2

          Dim swModelDocExt As SldWorks.ModelDocExtension


          Dim sDocName As String


          sDocName = OpenSWDoc(sFilePackAndGo)

          Set swModelDoc = swApp.ActiveDoc

          Set swModelDocExt = swModelDoc.Extension


          Dim swPackAndGo As SldWorks.PackAndGo

          Set swPackAndGo = swModelDocExt.GetPackAndGo


          swPackAndGo.IncludeDrawings = False

          swPackAndGo.IncludeSimulationResults = False


          Dim pgFileNames As Variant

          Dim pgFileStatus As Variant

          Dim status As Boolean


          status = swPackAndGo.GetDocumentNames(pgFileNames)


          Dim namesCount As Long


          namesCount = swPackAndGo.GetDocumentNamesCount




      but when I launch "GetDocumentNames" the MACRO is freezed for many time.


      There is a workaround for this problem ?


      Thanks, Andrea.