Nikon Posted November 19, 2025 Posted November 19, 2025 (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? Edited November 19, 2025 by Nikon Quote
GLAVCVS Posted November 20, 2025 Posted November 20, 2025 (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 November 20, 2025 by GLAVCVS Quote
mhupp Posted November 20, 2025 Posted November 20, 2025 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. Quote
Nikon Posted November 20, 2025 Author Posted November 20, 2025 (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 November 20, 2025 by Nikon Quote
Nikon Posted November 20, 2025 Author Posted November 20, 2025 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. Quote
GLAVCVS Posted November 20, 2025 Posted November 20, 2025 (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) ) 1 Quote
GLAVCVS Posted November 20, 2025 Posted November 20, 2025 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. 1 Quote
GLAVCVS Posted November 20, 2025 Posted November 20, 2025 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 1 Quote
Nikon Posted November 20, 2025 Author Posted November 20, 2025 (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. 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 November 20, 2025 by Nikon Quote
ScottMC Posted yesterday at 12:45 AM Posted yesterday at 12:45 AM here's 2 for h&v alignment:..DIM.Fix.Y.Leaders.lsp ..DIM.Fix.X.Leaders.lsp 1 Quote
Nikon Posted yesterday at 07:09 AM Author Posted yesterday at 07:09 AM (edited) 12 hours ago, ScottMC said: here's 2 for h&v alignment Edited 20 hours ago by Nikon Quote
Romero Posted 1 hour ago Posted 1 hour ago ;;; DIMFL - Shorten the extension lines of selected dimensions. ;;; ;;; Applies a per-dimension override of DIMFXLON / DIMFXL, so the extension line ;;; starts at a fixed distance from the dimension line instead of at the ;;; definition point. Fixes the dimensions you pick, not the whole style. ;;; ;;; NO MEASUREMENT CHANGES. Definition points are not moved; only how far the ;;; extension line is DRAWN. A 50 stays a 50. ;;; Reversible with the Restore option. One Ctrl+Z undoes the whole pass. ;;; ;;; WARNING: if a dimension looks wrong because its definition point MOVED, this ;;; fixes the look but not the value, and makes the error harder to spot. Check ;;; the numbers before shortening anything. (vl-load-com) (defun R0:DFL-Get (obj prop / r) (setq r (vl-catch-all-apply 'vlax-get (list obj prop))) (if (vl-catch-all-error-p r) nil r)) (defun R0:DFL-Put (obj prop val / r) (setq r (vl-catch-all-apply 'vlax-put (list obj prop val))) (not (vl-catch-all-error-p r))) ;; (logand 4 nil) throws, so a missing layer record answers "not locked". (defun R0:DFL-Bloqueada (en / cap) (setq cap (tblsearch "LAYER" (cdr (assoc 8 (entget en))))) (and cap (= 4 (logand 4 (cdr (assoc 70 cap)))))) ;; Default length = whatever the first picked dimension already carries. Whoever ;; set up the style usually chose a number that suits the drawing scale. (defun R0:DFL-Sugerido (ss / i en obj v) (setq i 0 v nil) (while (and (< i (sslength ss)) (null v)) (setq en (ssname ss i) i (1+ i) obj (vlax-ename->vla-object en) v (R0:DFL-Get obj 'ExtLineFixedLen)) (if (or (not (numberp v)) (<= v 1e-9)) (setq v nil))) (if v v 2.5)) (defun c:DIMFL ( / *error* ss i en obj largo sug modo hechos fallo bloq und doc) (defun *error* (msg) (if und (vl-catch-all-apply 'vla-EndUndoMark (list doc))) (if (and msg (not (wcmatch (strcase msg) "*CANCEL*,*QUIT*,*BREAK*,*EXIT*,*ABORT*"))) (princ (strcat "\n[X] DIMFL: " msg))) (princ)) (princ "\nDIMFL | Shorten extension lines (no measurement is changed).") (princ "\n Select dimensions: ") (if (null (setq ss (ssget '((0 . "DIMENSION"))))) (princ "\n[!] DIMFL: nothing selected.") (progn (princ "\n Shorten = fixed length extension lines") (princ "\n Restore = back to starting at the definition point (LONG again)") (initget "Shorten Restore") (setq modo (getkword "\n [Shorten/Restore] <Shorten>: ")) (if (null modo) (setq modo "Shorten")) (if (= modo "Shorten") (progn (setq sug (R0:DFL-Sugerido ss)) (initget 6) (setq largo (getdist (strcat "\n Extension line length <" (rtos sug 2 3) ">: "))) (if (null largo) (setq largo sug)))) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)) und T) (vla-StartUndoMark doc) (setq i 0 hechos 0 fallo 0 bloq 0) (while (< i (sslength ss)) (setq en (ssname ss i) i (1+ i)) (if (R0:DFL-Bloqueada en) (setq bloq (1+ bloq)) (progn (setq obj (vlax-ename->vla-object en)) ;; ExtLineFixedLen = DIMFXL, ExtLineFixedLenSuppress = DIMFXLON. ;; Despite the "Suppress" name the value follows DIMFXLON: 0 = off ;; (long lines), -1 = on (fixed length). Length first, switch second. (if (= modo "Shorten") (if (and (R0:DFL-Put obj 'ExtLineFixedLen largo) (R0:DFL-Put obj 'ExtLineFixedLenSuppress -1)) (setq hechos (1+ hechos)) (setq fallo (1+ fallo))) (if (R0:DFL-Put obj 'ExtLineFixedLenSuppress 0) (setq hechos (1+ hechos)) (setq fallo (1+ fallo)))) (vl-catch-all-apply 'vla-Update (list obj))))) (vla-EndUndoMark doc) (setq und nil) (princ (strcat "\n\n[OK] DIMFL: " (itoa hechos) " dimension(s) " (if (= modo "Shorten") (strcat "with a " (rtos largo 2 3) " extension line") "restored: their lines are LONG again"))) (if (> bloq 0) (princ (strcat "\n " (itoa bloq) " on locked layers: skipped."))) (if (> fallo 0) (princ (strcat "\n " (itoa fallo) " did not accept the change."))) (if (= modo "Shorten") (princ "\n No measurement changed. To revert: DIMFL, Restore option.") (princ "\n To shorten them again: DIMFL, Shorten option.")))) (princ)) (princ "\n[DIMFL] loaded. Type DIMFL to shorten extension lines.") (princ) Quote
Recommended Posts
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.