X11start Posted February 1, 2021 Posted February 1, 2021 (edited) I just joined this forum and I would like to contribute one of my lisp: 'VERIFQTA"to verify the "Forced dimensions", that is to say the value has been changed ... and which often generate errors. (I translate in english all message) VERIFQTA.LSP Edited February 1, 2021 by X11start Quote
dexus Posted February 2, 2021 Posted February 2, 2021 Welcome and thanks for sharing. I read your description and I think it might do the same as the code below. ; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-change-color-of-dimensions-with-text-override/m-p/5103678/highlight/true#M323552 (defun c:dimover ( / ent i ss txt) (if (setq ss (ssget "_X" '((0 . "DIMENSION")))) (repeat (setq i (sslength ss)) (setq ent (entget (ssname ss (setq i (1- i)))) txt (cdr (assoc 1 ent)) ) (if (not (or (= txt "") (wcmatch txt "*<>*"))) (if (assoc 62 ent) (entmod (subst (cons 62 2) (assoc 62 ent) ent)) ;; change the color 2 if needed (entmod (append ent (list (cons 62 2)))) ;; change the color 2 if needed ) ) ) ) (princ) ) 1 Quote
X11start Posted February 3, 2021 Author Posted February 3, 2021 It's actually a much simpler code than my! Thank you! Quote
Lee Mac Posted February 3, 2021 Posted February 3, 2021 Here's another way to write it: (defun c:dimover ( / i s ) (if (setq s (ssget "_X" '((0 . "*DIMENSION")(1 . "*?*")(1 . "~*<>*")))) (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((62 . 1)))) ) ) (princ) ) 2 Quote
X11start Posted February 4, 2021 Author Posted February 4, 2021 Many years ago I was a subscriber to a Commodore 64 newspaper: there was always a column called "one line" in which you tried to put a series of commands in a single line ... even a micro videogame! It was a very useful "synthesis" exercise to avoid creating too verbose codes! Your answers brought me back to those times! Thanks! 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.