Efeezy Posted June 23, 2016 Share Posted June 23, 2016 I am using attributed text wire tags. I was wondering if there is a quick way to add a D to the front of my wire tag? The fastest way I have found so far is using the properties box EX. tag S,V. When I select multiple wire tags S,V on my wire run and the S,V shows up in the properties box then I can add my D. If I have a SV 2S,V 2S,2V selected then the properties box says varies. Is there a lisp or a solution to this problem? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 23, 2016 Share Posted June 23, 2016 Try the following: (defun c:attps ( / a b c e i s x ) (setq a (getstring t "\nSpecify prefix <none>: ") b (getstring t "\nSpecify suffix <none>: ") c [highlight]"S,V" ;; Attribute Tag - change to suit[/highlight] ) (if (setq s (ssget "_:L" '((0 . "INSERT") (66 . 1)))) (repeat (setq i (sslength s)) (setq e (entnext (ssname s (setq i (1- i)))) x (entget e) ) (while (= "ATTRIB" (cdr (assoc 0 x))) (if (= (cdr (assoc 2 x)) c) (entmod (subst (cons 1 (strcat a (cdr (assoc 1 x)) b)) (assoc 1 x) x)) ) (setq e (entnext e) x (entget e) ) ) ) ) (princ) ) 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.