SLW210 Posted August 17 Posted August 17 I have some drawings with issues with DIMBREAK. While working in the drawing and creating the dimensions, then breaking them, I have no issues, but after saving and closing then opening these drawings I did a few weeks ago and modifying, moving, deleting objects that break the dimension, the gaps remain. So far it's just been these few drawings I am modifying, I haven't reproduced the issue yet. Probably a long shot that it's happened to anybody else, but it has me stumped as to how this happened. I have just created new dimensions and all is fine now. I guess just a weird fluke. DIMBREAK Issue R14.dwg DIMBREAK Issue.dwg Quote
SLW210 Posted August 18 Author Posted August 18 DIMBREAK>Remove works but is tedious, then I have to rebreak them. Still stumped on what caused this in these drawings, not all of the dimensions with DIMBREAKs froze like this. I came up with a LISP to remove all DIMBREAKs in a drawing, now I just need redo the dimensions that need breaks. Also, I believe all of the dimensions with issues were broken by an object, those that were not having issues were broken by other dimensions. Quote
DavidP Posted 5 hours ago Posted 5 hours ago I never used dimbreak before so but can you use a lisp select all the dim and test which ones which have DimBreaks applied to the then just re-set them.? Test on a few drawings first (make sure run it on back version)... I did this with the help of ai... but it appears to work for me... (perhaps some can verify and improve on it) I'm on on Version 2027 Map but his worked for me. I have notice two things if the dimension are not on screen and the object it crosses are a layer that is off the break reset doesn't work. (So I added zoom extents and do both layer on and thaw for any layer that is printable. Then at the end I reset everything back. But it may be better to do that before you start... as I seen AutCAD behaving strange... Where some lisp functions run before the previous task is complete... (defun c:RefreshDimBreaks ( / layers oldecho i data name flags plot off frozen answer item viewctr viewsize) (setq oldecho (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq viewctr (getvar "VIEWCTR")) (setq viewsize (getvar "VIEWSIZE")) (setq layers '()) (if (tblnext "LAYER" T) (progn (while (setq data (tblnext "LAYER")) (setq name (cdr (assoc 2 data))) (setq flags (cdr (assoc 70 data))) (setq plot (cdr (assoc 290 data))) (setq off (< (cdr (assoc 62 data)) 0)) (setq frozen (= (logand flags 1) 1)) (if (and (= (if plot plot 1) 1) (or off frozen)) (setq layers (cons (list name off frozen) layers)) ) ) ) ) (if (> (length layers) 0) (progn (princ (strcat "\nFound " (itoa (length layers)) " printable layers that are off or frozen.")) (initget "Y N") (setq answer (getstring T "\nTurn these layers on and thaw them temporarily? [Y/N] <N>: ")) (if (or (= answer "") (= (strcase answer) "N")) (princ "\nNo changes made.") (if (= (strcase answer) "Y") (progn (foreach item layers (command "_.-LAYER" "_ON" (car item) "") (command "_.-LAYER" "_THAW" (car item) "") ) ) ) ) ) (princ "\nNo printable layers are off or frozen.") ) (RefreshDims) (foreach item layers (if (cadr item) (command "_.-LAYER" "_OFF" (car item) "") ) (if (caddr item) (command "_.-LAYER" "_FREEZE" (car item) "") ) ) (princ "\nOriginal layer states restored.") (command "_.ZOOM" "_C" viewctr viewsize) (command "_.REGEN") (setvar "CMDECHO" oldecho) (princ) ) (defun RefreshDims ( / ss ssBreak oldecho i ent dict 360type) (setq oldecho (getvar "CMDECHO")) (setvar "CMDECHO" 0) (command "_.ZOOM" "_E") (if (setq ss (ssget "_X" '((0 . "DIMENSION")))) (progn (setq ssBreak (ssadd)) (setq i 0) (while (< i (sslength ss)) (setq ent (ssname ss i)) (if (setq dict (cdr (assoc 360 (entget ent)))) (progn (setq 360type (cdr (assoc 0 (entget dict)))) (if (= 360type "DICTIONARY") (ssadd ent ssBreak) ) ) ) (setq i (+ i 1)) ) (if (> (sslength ssBreak) 0) (progn (princ (strcat "\nRefreshing " (itoa (sslength ssBreak)) " dimension breaks.")) (command "_.DIMBREAK" "_M" ssBreak "" "_R") (command "_.DIMBREAK" "_M" ssBreak "" "_A") ) (princ "\nNo dimensions with extension dictionaries found.") ) ) (princ "\nDrawing does not have any dimensions") ) (setvar "CMDECHO" oldecho) (princ) ) 1 Quote
SLW210 Posted 2 hours ago Author Posted 2 hours ago Thanks, I fixed those drawings, but your LISP works great. I have been having a ton of issues like this since work upgraded me to Windows 11 a while back. I have a reference number for Autodesk to look into it, but I keep getting the run around. 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.