8 Replies Latest reply on Oct 3, 2016 1:06 PM by Arthur McRae

    To use or not to use a macro

    Christian Chu

      Please don't get me wrong. I love using macro(s)  since macro helps me more productive for repetitive jobs. The fact, I have more than 10 macros on my SW.  However, unless there is a MUST, I'd prefer using  SW build-in features since I don't want to tie my hand when I sit down in front of other computers (Edit: not from sane company)  without my macros

      What you guys think???

        • Re: To use or not to use a macro
          Deepak Gupta

          I would use macro where ever and when ever possible. And can utilize time saved in some other productive tasks or enhancing/sharing my knowledge.

          • Re: To use or not to use a macro
            Keith Rice

            If these tools make you and your team more productive, you ought to make them available across all CAD workstations.


            I would recommend an addin called "<company name> Tools" that contains all of this functionality. You can easily turn the addin on and off when you move from computer to computer.


            This can also be done to some extent with macros, but it's less ideal. You could have them all on a network drive, create shortcut buttons for each macro, export these toolbar settings, then import these settings on other computers. The problem is that if the user decides to turn off the toolbar or shortcuts, you will have to browse for the macros. The other problem is that VBA macros are less secure. You might need to password protect them.



            SolidWorks API Training and Services

            • Re: To use or not to use a macro
              John Stoltzfus

              Using Macros for different duties depend on the time it takes to do it by "hand" or let it run in auto...  I think it depends on our individual workflow and our companies required final drawing output etc...


              My main ones that I use everyday are as follows;


              1. Overall Part Size
              2. Rename the "Default" configuration to the File Name
              3. Rename the Drawing Sheet Tabs to the "Part or Assembly Configuration Name"
              4. Rebuild the drawings using a macro that opens every view of the Assembly or Part, rebuilds and closes
              5. Reload my Sheet Formats (to make sure we have the latest and greatest Formats
              6. My most favorite of them all is the macro written by Leon Wurr  which counts the sheet tabs and eliminates any header sheets that the tabs have the word "COVER" - That macro allows me to have multiple cover sheets that pertain to that project, but that I don't want to have part of the printed drawing file.
              7. Save as a PDF, indexes through multiple tab drawings and saves each sheet separately


              The others that I like to use


              1. Delete Blank lines in the Custom Properties
              2. Collect all Custom Properties
              3. Spell Checker
              4. Feature Tree sort
                • Re: To use or not to use a macro
                  Christian Chu

                  Thanks, John

                  I also have some macros for 2D dwg. We sent out the dwg to vendors so I just want to make sure our drawings the same format

                  one of the macros is  "SaveAsPDF"

                  Why I want to create a macro SaveAsPDF while this feature is already built in SW

                  We are using workgroup PDM so the file name is unique and the rev. is controlled by PDM - How to send the vendors file name with diff. versions? what we do here is to add a letter of revision to the end of the file name for each release and that is the reason why we need a macro for SaveAsPDF with a letter of revision (retrieving from Vault) adding to the end of the file name and saved to a specific folder instead of working folder


                  My point is: without  this reason, I'd prefer to use SW build in feature "SaveAsPDF" instead of writing a macro "SaveAsPDF"

                • Re: To use or not to use a macro
                  Arthur McRae

                  We got around that by having our Macro Library on our network and having standardized Solidworks settings across the company.