designerstuart Posted August 12, 2013 Posted August 12, 2013 hi all i want to be able to change a dimension to read "eq" or "equal" etc just by one click. i expect this is possible but i don't know how to do it. at the moment i spend a lot of time typing "eq" when making lighting layouts and general setting out drawings. i would like to automate it, and have no preference between button or command. if possible, change multiple dims together would also be handy. thanks for any help Quote
Lee Mac Posted August 12, 2013 Posted August 12, 2013 Try the following: (defun c:dimeq ( / e i s ) (if (setq s (ssget "_:L" '((0 . "*DIMENSION")))) (repeat (setq i (sslength s)) (setq e (entget (ssname s (setq i (1- i))))) (entmod (subst '(1 . "eq") (assoc 1 e) e)) ) ) (princ) ) Quote
designerstuart Posted August 12, 2013 Author Posted August 12, 2013 Lee Mac - the original and still the finest! thank you, it is perfect for my needs. one of these days i will donate to your website. legend! Quote
Lee Mac Posted August 12, 2013 Posted August 12, 2013 That's very kind of you Stuart, thank you Quote
designerstuart Posted December 18, 2013 Author Posted December 18, 2013 right, so this works like a charm, very pleased thanks lee! now i want to do the opposite! is it possible to remove dimension override text with a one-click function? either select lots of dims, input command, and all dims are back to 'natural' state or failing that, input command, pick a dim, it reverts to 'natural' thanks all, most appreciated! Quote
MSasu Posted December 18, 2013 Posted December 18, 2013 Please adjust this line: (entmod (subst '(1 . "[color=magenta]<>[/color]") (assoc 1 e) e)) ;replace "eq" with "<>" Quote
cwake Posted December 18, 2013 Posted December 18, 2013 There are several options Stuart. You could use the routine that Lee gave you and change the text that it uses to either an empty string i.e. "" or the less than-greater than "". as in (entmod (subst '(1 . "") (assoc 1 e) e)) or (entmod (subst '(1 . "<>") (assoc 1 e) e)) Or alternatively the standard autocad command "dimedit" => "new" => "OK" Quote
pBe Posted December 18, 2013 Posted December 18, 2013 or even command: Dim n (select all) EDIT: oops (look up ↑) Quote
designerstuart Posted December 18, 2013 Author Posted December 18, 2013 great chaps, thank you. i prefer the option, that makes sense to me. 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.