6 Replies Latest reply on Apr 2, 2015 4:38 PM by Joseph McCabe

    dimension style macro

    Joseph McCabe

      I am seeking assistance creating a macro to initiate the "Smart Dimension" command and then select a pre-defined dimension style.

       

      We produce millwork that requires parts and assemblies from several different manufacturing disciplines, each one requiring different styles, accuracy, and tolerances for dimensioning.  I really wish we could set a style and have it remain as the default until the user selected to change it to another style, which would then become the default.  Currently, we have to select a saved dimension type for every dimension, which not only demands the few extra several clicks, it also is frequently forgotten in the drafting process and creates grief on the shop floors of our various departments.  We already have our most commonly used style set in the documents properties, but even this seems inadequate versus being able to set a named and saved style as a default.

       

       

      In the meantime, I am hoping to employ a macro button that would be used to initiate the "Smart Dimension" command and set the dimension style to one of 4 different saved styles.  I would need, of course, to create four macros, one for each style.  For the rare instances where we use one of the other dimension commands (ie Horizontal, etc.), I would still rely on the practice of updating the style as we currently do.

       

      In use, a draftsman would click the macro button instead of clicking on the smart dimension button and then setting the style in the dialog box, either prior to or after dimensioning a drawing element.

       

      Any tips and/or assistance is appreciated.

       

      Joseph McCabe

        • Re: dimension style macro
          Keith Rice

          It would probably be simplest if you gave the criteria for one of these dimensions and then we could create an example for you.

           

          Keith

          SolidWorks API Tutorials

            • Re: dimension style macro
              Joseph McCabe

              I'm not sure what you mean by criteria.  Are you asking for the actual dimension settings like leader line weight, arrow type, font, etc?

              The saved dimension styles have name format like:

               

              555_Metal

              555_Millwork,

               

              They share some characteristics like font and lettering size.  The differences between the styles are substantial though.  This includes options like accuracy, one uses decimals, others use factions, one is an architectural standard with feet and inches, some are metric, others are imperial, while one style employs tolerances, none of the others do, the arrow types and leaders vary, etc etc.

               

              Would it be helpful to post a model and drawing set illustrating a typical sheet?

                • Re: dimension style macro
                  John Stoltzfus

                  Why not setup different part, drawing and assembly templates - you would have to know your selection process before you make the part

                    • Re: dimension style macro
                      Joseph McCabe

                      We could solve this from that angle for some situations, but not all.  We typically use the various styles within a single document, often on the same sheet too.  Our products typically include metal, woodwork, stone, and glazing, as well as other materials, all within one assembly.  We can, and occasionally do, create part drawings and separate sheet files for the different trades, though we prefer to avoid that under most situations.  Solidworks is really good at creating separate files and drawings that way but it also creates, for us at least, other problems that we would like to avoid if possible.  We find it helpful for each department to see what the other divisions are responsible for and also for the main shop floor to see what to expect in final assembly.  We believe having different styles within one drawing seems better than multiple files and drawing sets for a single assembly.

                        • Re: dimension style macro
                          John Stoltzfus

                          You say different styles within one drawing, do you mean tabs or different styles on the same page - I you have one style per page then all you would need is the correct formatted drawing template, but if you're doing different styles on one page........ that's a totally different story

                            • Re: dimension style macro
                              Joseph McCabe

                              Granted, its not often that the styles appear on the same sheet tab together, but that does occur for smaller projects every now and then.  Certainly within our typical work, we usually have different styles with a single file.  Sheet tabs Sheet1 through Sheet6 might be designated for the millshop with one type of dimension style.  Sheet7 through Sheet12 might be headed to the metal shop with it's style requirements.  We also have different style requirements to meet international clientele that request metric versions of our drawings, as well as domestic client's within the architectural community that prefer to see feet and inches rather than only an inch expression.  To occasionally accomplish these later tasks, we just copy a file, convert the needed parameters, print a submittal set of PDF's and archive the altered solidwork file.  If we need to issue a revision set, we start the copy/change process over again. 

                               

                              I am not aware that I can control default styles by sheet tab.  My understanding is that this is controlled at the document level.

                               

                              Is creating a macro function to accomplish this as complicated as it seems?  I have searched tirelessly for something to address this issue and have not yet found a solution.  I have spent quite a bit of time trying various work-arounds to come up with something that helps but I keep coming back to the macro solution as one that would really, and I thought simply, solve the issue for us.  I finally broke down and came here to ask for help.  If it is to difficult to easily accomplish, I will move on and put my efforts towards other tasks.