ILoveMadoka Posted January 25, 2010 Share Posted January 25, 2010 I don't even know where to begin with this one and I'm sure someone can code this before I can even research it. I'd like to find all dimensions in a drawing that have an overide and change their color to Magenta. We have a terrible time getting drafters to draw correctly and without manually checking every dimension I'd like to be able to see where they "took creative liberties." While I'd like to ask if this is difficult, I know current company doesn't find many requests difficult. Thank all of you for everything you've helped me and others with. Quote Link to comment Share on other sites More sharing options...
gile Posted January 25, 2010 Share Posted January 25, 2010 Hi, Something like this ? (defun c:test (/ ss n ent elst) (if (setq n 0 ss (ssget "_X" '((0 . "DIMENSION") (-4 . "<not") (1 . "") (-4 . "not>")) ) ) (while (setq ent (ssname ss n)) (setq elst (entget ent) n (1+ n)) (entmod (if (not (assoc 62 elst)) (append elst '((62 . 6))) (subst '(62 . 6) (assoc 62 elst) elst) ) ) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
lpseifert Posted January 25, 2010 Share Posted January 25, 2010 Here's my stab at it (defun c:test (/ ss1 sslen cnt obj tst) (vl-load-com) (setq ss1 (ssget "x" '((0 . "*DIMENSION*"))) sslen (sslength ss1) cnt 0) (repeat sslen (setq obj (vlax-ename->vla-object (ssname ss1 cnt)) tst (vlax-get obj 'TextOverride)) (if (vl-string->list tst) (vlax-put-property obj 'Color 6) ) (setq cnt (1+ cnt)) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
paulmcz Posted January 25, 2010 Share Posted January 25, 2010 Hi Gile, if overwrite text includes , how would you filter that dimension out of the selection? Thanks, Paul. Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted January 25, 2010 Author Share Posted January 25, 2010 Both work great!! Thanks so much!!! Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted January 25, 2010 Author Share Posted January 25, 2010 I tested it and an override is an override. Is someone uses the actual dimension or AND adds a note it is still flagged. *PERFECT* Quote Link to comment Share on other sites More sharing options...
gile Posted January 25, 2010 Share Posted January 25, 2010 if overwrite text includes , how would you filter that dimension out of the selection? (ssget "_X" '((0 . "DIMENSION") (-4 . "<not") (-4 . "<or") (1 . "") (1 . "*<>*") (-4 . "or>") (-4 . "not>") ) ) or, a little more cryptic: (ssget "_X" '((0 . "DIMENSION") (-4 . "<not") (1 . "") (-4 . "not>") (1 . "~*<>*")) ) Quote Link to comment Share on other sites More sharing options...
paulmcz Posted January 25, 2010 Share Posted January 25, 2010 Perfect Gile, thank you very much. It would take me for ever to figure out how to work things out with those wild charcters. Thanks again. Paul. Quote Link to comment Share on other sites More sharing options...
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.