Jump to content

Align the extension lines to the short line of each selected size


Recommended Posts

Posted (edited)

Hello everyone.
You need to select several sizes and align the extension lines to the short line of each selected size.
Maybe there is such a program?

dimension lines.png

Edited by Nikon
  • Nikon changed the title to Align the extension lines to the short line of each selected size
Posted (edited)

I don't think we've understood your question yet (at least I haven't). 

You might need to elaborate a bit and add some more images.

Edited by GLAVCVS
Posted

I'm guessing they have a drawing and want all the long blue dim extension lines to be shortened to where the dimension is. but the top blue one looks like its pulling from the right and left like the dimension itself is inside the feature its measuring. were the bottom red is only pulling from the right.

Posted (edited)
3 hours ago, GLAVCVS said:

I don't think we've understood your question yet (at least I haven't). 

You might need to elaborate a bit and add some more images.

Sometimes the extension lines of associative dimensions are stretched (for example, to the origin of coordinates ) when inserted into another drawing.

Now I've found a way to disable dimensions associativity, but I don't really like it. I only find out that the dimensions have lost their connection with the object when I insert them into another drawing (or turn on the annotation monitor).
So I thought it would be possible to align the extension lines to a smaller extension line. 
Maybe there is a better way...

; disable associativity of only selected dimensions
(defun c:DimAssOf ( / ss)
  (vl-load-com)

  (prompt "\nSelect DIMENSION to disable associativity: ")
  (setq ss (ssget '((0 . "DIMENSION")))) 

  (if ss
    (progn
      (command "_.DIMDISASSOCIATE" ss "")
      (prompt
        (strcat
          "\nDone: associativity is disabled for "
          (itoa (sslength ss))
          " dimensions."
        )
      )
    )
  )

  (princ)
)


extension lines.dwg

Edited by Nikon
Posted
1 hour ago, mhupp said:

I'm guessing they have a drawing and want all the long blue dim extension lines to be shortened to where the dimension is. but the top blue one looks like its pulling from the right and left like the dimension itself is inside the feature its measuring. were the bottom red is only pulling from the right

The blue dimension should become the same as the red one.

Posted
(defun c:DimAssOf ( / ss e le n)
  (vl-load-com)

  (prompt "\nSelect DIMENSION to disable associativity: ")
  (setq ss (ssget '((0 . "DIMENSION"))))

  (if ss
    (progn
      (command "_.DIMDISASSOCIATE" ss "")
      (prompt
        (strcat
          "\nDone: associativity is disabled for "
          (itoa (sslength ss))
          " dimensions."
        )
      )
      (while (setq e (ssname ss (setq n (if n (1+ n) 0))))
	(setq le (entget e))
	(entmod (subst (list 14 (cadr (assoc 13 le)) (caddr (assoc 14 (entget e))) 0.0) (assoc 14 le) le))
      )
    )
  )

  (princ)
)

 

  • Like 1
Posted
1 minute ago, GLAVCVS said:
(defun c:DimAssOf ( / ss e le n)
  (vl-load-com)

  (prompt "\nSelect DIMENSION to disable associativity: ")
  (setq ss (ssget '((0 . "DIMENSION"))))

  (if ss
    (progn
      (command "_.DIMDISASSOCIATE" ss "")
      (prompt
        (strcat
          "\nDone: associativity is disabled for "
          (itoa (sslength ss))
          " dimensions."
        )
      )
      (while (setq e (ssname ss (setq n (if n (1+ n) 0))))
	(setq le (entget e))
	(entmod (subst (list 14 (cadr (assoc 13 le)) (caddr (assoc 14 (entget e))) 0.0) (assoc 14 le) le))
      )
    )
  )

  (princ)
)

 

Do you really need to disassociate the dimension?

If you don't need to for another reason, you can delete that part of the code.

  • Like 1
Posted
3 minutes ago, GLAVCVS said:

Do you really need to disassociate the dimension?

If you don't need to for another reason, you can delete that part of the code.

Like that

1763667260880.thumb.jpg.c6c797f758556e9ab9bd292bdfd08016.jpg

  • Thanks 1
Posted (edited)
39 minutes ago, GLAVCVS said:

Do you really need to disassociate the dimension?

If you don't need to for another reason, you can delete that part of the code.

@GLAVCVS Thank you very much, but you only need to choose the "stretched" dimensions.
If you choose the usual dimensions, they may change.

dim 0.png

Yes, associativity can be left on.

(defun c:DimAlignExtLine ( / ss e le n)
  (vl-load-com)

  (prompt "\nSelect the dimensions for alignment: ")
  (setq ss (ssget '((0 . "DIMENSION"))))

  (if ss
    (progn
    (while (setq e (ssname ss (setq n (if n (1+ n) 0))))
	(setq le (entget e))
	(entmod (subst (list 14 (cadr (assoc 13 le)) (caddr (assoc 14 (entget e))) 0.0) (assoc 14 le) le))
      )
    )
  )

  (princ)
)

 

Edited by Nikon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...