Diameter dimensions suddenly changed.

I was wondering if anyone here has ever had the diameter dimensions on a 2D drawing suddenly, spontaneously change.   A couple weeks ago, I created a drawing with some 2D views in model space.   I find it a lot easier to dimension parts in model space, than on a layout view.)   Anyway, I actually built parts from the 2D views.   Then today I re-opened the drawing and found that all my diameter dimensions were changed.   There is no problem with linear and ordinate dimensions - just diameter dimensions.   For instance, a diameter dimension of .1285 changed to .66258.   I can't imagine how this would happen.   I can place new diameter dimensions, and they are correct.  But why did all the old dimensions change? 

Comments

  • Without a dwg it is hard to diagnose. It may be a DIMLFAC issue. Some dimensions may have an override. But if that is the case something must have triggered it.
  • My apologies Roy.  Here is the drawing.  (I have already deleted some of the defective diameter dimensions, and applied the diameter tool a second time.)   But you can still find the dimensions which are incorrect.

    AF-0005 2D.dwg

  •  I had a related issue, and discussed it in another thread. And as often is the case, the BricsCAD powerhouse known, as Roy Klein Gebbinck, came to the rescue and he wrote a routine to find the non-associated paper space dimensions  See the linked thread below to get it.


    -joe

  • In this case all dimensions are non-associative because the dimensioned elements are nested in blocks. The problem is caused by one of the definition points of the diameter dimension having an elevated position (e.g. 0.65 or 10.4 instead of 0.0).

    Here is some code to fix this. The code assumes that the drawing is 2D.
    [code](defun c:UpdateDimDia ( / cnt doc ss)
      (if (setq ss (ssget '((100 . "AcDbDiametricDimension"))))
        (progn
          (setq doc (vla-get-activedocument (vlax-get-acad-object)))
          (if (= (logand (getvar 'undoctl) 8) 8)
            (vla-endundomark doc)
          )
          (vla-startundomark doc)
          (setq cnt
            (length
              (vl-remove
                nil
                (mapcar
                  '(lambda (enme / elst)
                    (setq elst (entget enme))
                    (if
                      (and
                        (equal (cdr (assoc 210 elst)) '(0.0 0.0 1.0) 1e-8)
                        (not (equal (last (assoc 10 elst)) (last (assoc 15 elst)) 1e-8))
                      )
                      (entmod
                        (subst
                          (append
                            (vle-remove-last (assoc 15 elst))
                            (list (last (assoc 10 elst)))
                          )
                          (assoc 15 elst)
                          elst
                        )
                      )
                    )
                  )
                  (vle-selectionset->list ss)
                )
              )
            )
          )
          (princ (strcat "\n" (itoa cnt) " diameter dimension(s) updated "))
          (vla-endundomark doc)
        )
      )
      (princ)
    )[/code]
  •  I had a related issue, and discussed it in another thread. And as often is the case, the BricsCAD powerhouse known, as Roy Klein Gebbinck, came to the rescue and he wrote a routine to find the non-associated paper space dimensions  See the linked thread below to get it.


    -joe


    Joe,

    Sorry for my delay in responding.  I have been sick for the past week.    What I don't get, is how the dimensions became "non-associated".  Also, 
    these were never paper space dimensions.  I moved the 2D views to model space, exploded and tweaked the views, saved under new block names, then added dimensions.   Next time I re-opened the drawing, I found that my dimensions changed. 
  •  I had a related issue, and discussed it in another thread. And as often is the case, the BricsCAD powerhouse known, as Roy Klein Gebbinck, came to the rescue and he wrote a routine to find the non-associated paper space dimensions  See the linked thread below to get it.


    -joe


    Joe,

    Sorry for my delay in responding.  I have been sick for the past week.    What I don't get, is how the dimensions became "non-associated".  Also, 
    these were never paper space dimensions.  I moved the 2D views to model space, exploded and tweaked the views, saved under new block names, then added dimensions.   Next time I re-opened the drawing, I found that my dimensions changed. 
  •  Roy,

    Thank you for your efforts.  I am sorry again for my delay in responding...

    I don't know anything about your code.     Is it a LISP file?  What does it do?

    Jim C.
  •  LISP is a programming language.  It was the first way to create custom programs for AutoCAD, and it was actually known at AutoLISP.

    You can copy-paste the code into a text editor, like NotePad, and then save it with the .lsp extension. (a regular word processor will not work, because it will save the text style, and other info. It must be plain text)

    You can run the program by using the TOOLS/LOAD APPLICATION menu choices.  This screen permits you to build up a list of programs you want to use on occasion. Choose the ADD button to add the program to the list, and then the LOAD button to make the program actually run.

    What happens after that will depend on how the program was written to behave.

    -Joe
  • The code in my previous post will not automatically execute after loading the Lisp file. To start the command use: 'UpdateDimDia'.
    For additional options to load Lisp files see: http://www.b-k-g.nl/loading-lisp-programs.html

    The fact that the dimensions are non-associative is not surprising (see my explanation in post #5). But the elevated position of one of the definition points of course is. I can't think of a scenario, short of user input, that would cause this.
  • Roy,

    I want to thank you for the LISP code.  I just tried it, and it worked great.  Could you outline for me, how it goes about doing it's work? 

    I'm still not clear on how all of my diameter dimensions suddenly changed.   You said the dimensions  are "non associative" because they are in blocks.   Is dimensioning features in blocks problematic?  I've always dimensioned features in blocks, whether created by the _VIEWBASE or _BLOCK commands.   This was the first time I have ever known all the diameter dimensions to spontaneously change.  

     You said  "The problem is caused by one of the definition points of the diameter dimension having an elevated position..".   But I have multiple 2D blocks in my drawing, and the errors were found in all of them.    Do you think I should use the "FLATTEN" on my 2D objects before I create the blocks?  Would that correct the elevation issues?   (I would try this, but unfortunately, I didn't save a copy of the damaged drawing before I applied your LISP application.)
  • Interestingly using the FLATTEN command may well have caused your problem.

    Example scenario:
    1. Start a new drawing.
    2. Set the ELEVATION to 1000.
    3. Create a circle with R=2000.
    4. Create a Diametric Dimension for this circle (dim=4000).
    5. Use the FLATTEN command and select all entities.
    6. BC reports: 'Dimension disassociated'.
    7. The Diametric Dimension now reads 4123.
    8. The entity list of the dimension shows that 3 points have been flattened, but one definition point was skipped.

    So the advice must be: Use the FLATTEN command BEFORE creating any dimensions.

    I have noticed that the elements in your blocks sometimes have a minute Z-coordinate (in 1e-15 range). This is the result of rounding errors in the BricsCAD procedure that was used to create these blocks. You can find similar errors in BIM sections. I understand rounding errors, but it is still strange that a block that is supposed to be completely flat contains entities with non-zero Z-coordinates.

    Short explanation of the Lisp code:
    The code checks all Diametric Dimensions in the drawing. For each dimension it compares the elevation of two definition points and corrects the elevation of one point if they deviate. The code will skip dimensions that were not create in the WCS.
  • Thank you Roy..   So are you suggesting that the FLATTEN command DOES NOT work on some dimensions?
  • @ Jim:
    Yes, my scenario points to two issues.
    1.
    All (or most?) dimensions that are flattened lose their associativity.
    2.
    Diametric Dimension dimensions are only partly flattened resulting in 'buggy' values.

This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. Click one of the buttons on the top bar to get involved!