2 Replies Latest reply on Nov 28, 2017 2:00 AM by Shuhei Kazuma

    With a drawing open, how to automatically edit dimension text of all the existing dimensions?

    Shuhei Kazuma

      My goal is to create a macro which does the following:


      1. Detect all the dimensions in a currently active drawing
      2. For each dimension, prepend a number surrounded by circle before the existing dimension text, in a incremental basis.


      For example, let's say my drawing has 4 dimensions. Each dimension text is:


      1. "<DIM>"
      2. "<DIM>"
      3. "<MOD-DIAM><DIM>"
      4. "<DIM>"


      After macro runs, each dimension text must be edited to the following:


      1. "<C#-1><DIM>"

      2. "<C#-2><DIM>"

      3. "<C#-3><MOD-DIAM><DIM>"

      4. "<C#-4><DIM>"


      This way, each dimension gets a unique number. I believe this is possible but I am new to SolidWorks macro and not sure how to do this. Any help or advice is appreciated.


      Thank you