1 Reply Latest reply on Dec 12, 2013 4:40 AM by Deepak Gupta

    Closing assemblies and parts by MACRO

    Nimrod Ben-Horin

      I had wrote a macro for creation of STEP files from directory content

      The macro read directory content save the names of drawing files then it looks for parts and assemblies with identical names, the parts and assemblies then opened and SAVEAS is used to produce a STEP file

      After the STEP creation the MACRO try to close source (*.sldprt, *.sldasm).

      Using

       

      Set Part = Nothing

      swApp.CloseDoc FileSNames(i)

       

      For some reason the MACRO closes only parts but not assemblies

      In  a case of many drawings in directory the MACRO stuck

      Does MACRO can use another commands for closing files>

        • Re: Closing assemblies and parts by MACRO
          Deepak Gupta

          Welcome to SolidWorks forums Nimrod.

           

          I don't think there is anything different to close file.Without the complete macro it might be difficult to know the issue. Any chance if you can share the complete macro to check.

           

          Please use "advanced editor" in case you want to attach any files.Click on reply and then click "use advanced editor".

           

          Editor.png

           

           

          You might also find this post helpful for your future reference.